Hi,
I regularly create concentration vs. time plots in semi-log scale.
ticks-problem: very often (not always) ticks.render does not provide ticks
where the labels.render statement correctly creates labels.
solution to this would be replacing ticks.render by :
axis(side=1,labels=F,at=c(0.01,48,96,168,336,504))
but what is wrong then with the ticks.render() function??
labels-problem: sometimes one of t he y-labels after labels.render() is
not shown (only seen in log scale). For this I found no solution.
Run the example below and see what I mean. I think the xxx.render()
functions are not yet optimal.
cheers,
Klaas (6.1, XP)
par(mfrow=c(1,2),oma=rep(4,4))
data<-data.frame(matrix(0,ncol=2,nrow=504))
names(data)<-c("time","y")
data$time<-c(0.01,0.5,2.5,5,7.5,10,12.5,15,17.5,20,22.5,38,86,148,268,364,50
4)
data$y<-c(0.02,0.55,2.47,4.32,5.67,6.66,7.36,7.84,8.15,8.33,8.41,7.81,4.59,2
.22,0.54,0.17,0.035)
plot(data$time,data$y, log="y",xaxt="n",type="l",ylim=c(0.01,10))
## X axis -> change hours into days in time-labels
ticks.render(side=1,list(at=c(0.01,48,96,168,336,504)))
labels.render(side=1,list(at=c(0.01,48,96,168,336,504),text=c(1,3,5,7,14,21)
,cex=0.6))
plot(data$time,data$y, log="y",yaxt="n",xaxt="n",type="l",ylim=c(0.01,10))
## X axis -> change hours into days in time-labels
ticks.render(side=1,list(at=c(0.01,48,96,168,336,504)))
labels.render(side=1,list(at=c(0.01,48,96,168,336,504),text=c(1,3,5,7,14,21)
,cex=0.6))
axis(side=1,labels=F,at=c(0.01,48,96,168,336,504)) #solution
for x-axis ticks
## Y axis
ticks.render(side=2,list(at=c(0.01,0.1,1,10)))
labels.render(side=2,list(at=c(0.01,0.1,1,10),text=c("0.01","0.1","1","10"),
cex=0.6,line=1.5))
--------------------------------------------------------------------
This message, including attached files, may contain confidential
information and is intended only for the use by the individual
and/or the entity to which it is addressed. Any unauthorized use,
dissemination of, or copying of the information contained herein is
not allowed and may lead to irreparable harm and damage for which
you may be held liable. If you receive this message in error or if
it is intended for someone else please notify the sender by
returning this e-mail immediately and delete the message.
--------------------------------------------------------------------
|