| To: | <s-news@lists.biostat.wustl.edu> |
|---|---|
| Subject: | Re: Invidual scaling when using xyplot - overwriting ylim in a panel |
| From: | "TKT (Thomas Klitgaard)" <tkt@novonordisk.com> |
| Date: | Mon, 17 Dec 2007 12:17:27 +0100 |
| In-reply-to: | <5B833E900330354F9FDA984D06F92428030A72AF@ca-exchange.corp.pharsight.com> |
| Thread-index: | Acg+MwjROx+v3UEtRpmK8Z24SwOMtgCWE0ogAAS8afA= |
| Thread-topic: | [S] Invidual scaling when using xyplot - overwriting ylim in a panel |
|
Very good Andreas! This worked - thank
you!
BR Thomas
From: Andreas Krause [mailto:akrause@Pharsight.com] Sent: 17. december 2007 10:30 To: TKT (Thomas Klitgaard) Cc: s-news@lists.biostat.wustl.edu Subject: RE: [S] Invidual scaling when using xyplot - overwriting ylim in a panel An easy way out is to let S-Plus determine the axis
ranges, and that means having the desired range in the
data.
Remember that a point (x, y) does not get plotted if x or y
is NA, but the data is still used to determine axis ranges.
The solution is then to append your y data and
make the corresponding x missing.
If I understand your description correctly, the code should
be similar to this:
alldata.new <- alldata
alldata.new$DV <-
c(alldata$DV, alldata$IPRE, alldata$PRED)
alldata.new$TIME <- c(alldata$TIME, rep(NA,
2*nrow(alldata)))
xyplot(..., data="">
Andreas Krause From: s-news-owner@lists.biostat.wustl.edu [mailto:s-news-owner@lists.biostat.wustl.edu] On Behalf Of TKT (Thomas Klitgaard) Sent: Friday, December 14, 2007 10:24 AM To: s-news@lists.biostat.wustl.edu Subject: [S] Invidual scaling when using xyplot - overwriting ylim in a panel Dear all, As part a modelling problem that I'm currently
working on, I need to make plots of Group PK and PD generally in the same range, but
the between-ID varation in Ymax is I would like overwrite/set, for each panel, ylim to
the max(DVgroupPK,IPREgroupPK,PREDgroupPK, Thanks in advance! Thomas Klitgaard xyplot(DV~TIME|ID,data="">
panel.superpose(AllResults[subscripts,]$TIME,log10(AllResults[subscripts,]$IPRE),type="l",lty=4,subscripts,...);
mtext(side=3,line=-1,cex=.8,adj=.95,paste("Dose
(ug/kg)=",AllResults[subscripts,]$DOSE))
main="PK (blue) and PD (red) vs. time (full line: population mean, dashed
line: individual mean)", |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Invidual scaling when using xyplot - overwriting ylim in a panel, Andreas Krause |
|---|---|
| Next by Date: | Factor handling question., gerald . jean |
| Previous by Thread: | Re: Invidual scaling when using xyplot - overwriting ylim in a panel, Andreas Krause |
| Next by Thread: | Modifying boxes when plotting a timeSeries, eggraid |
| Indexes: | [Date] [Thread] [Top] [All Lists] |