[R] lineplot.CI xaxis scale change in sciplot?

David Winsemius dwinsemius at comcast.net
Mon Jul 4 18:09:23 CEST 2016


> On Jun 29, 2016, at 7:04 PM, Clemence Henry <C.Henry at westernsydney.edu.au> wrote:
> 
> Hi,
> 
> I am trying to change the values of the tick marks on the xaxis of the following multipanel plot (see relevant bits of script below) to increments of 50 or to a custom scale (ie. 50, 100, 150, 200, 300...).
> So far I tried using xaxp or xlim both in par() or lineplot.CI(), as well as axTicks and axisTicks but did not get it to work.
> Suggestions?

I don’t see a reproducible example so I’m not giving tested advice, but looking at the code for sciplot::lineplot.CI it appears that it might honor an ‘xlim' argument and accept xaxt=“n” and then you should be able to add axTicks as you specify.

If you choose to post again on the matter you should use `dput(object name)` to get a version of data suitable for testing.

— 
David.
> 
> #Plots average A/Ci for each day from ACi
> #Parameters of the panels
> par(mfcol=c(3,2), #row,col
>    mar=c(2,2,1,1), #inner margin (bottom, left, top, right)
>    oma=c(4,4,1,1), #outer margin (bottom, left, top, right)
>    omd=c(0.1,0.8,0.1,0.95), #outer dimensions, values {0-1}, (x1, x2, y1, y2)
>    xpd=NA)
> 
> ...
> 
> 
> #PAR = 1000, Day2
> with(subset1000_2,
>     lineplot.CI(x.factor=Ci.average,
>                 response=Photo,
>                 group=Treatment,
>                 ylab=NA,
>                 xlab=NA,
>                 legend=FALSE,
>                 type="p",
>                 x.cont=TRUE, #continuous x axis (spacing proportional to values)
>                 ylim=c(1,45), #range y axis
>                 err.width=0.05,
>                 pch = c(16,16,16), #symbols shape
>                 col=c("gray84","black","gray48"),
>                 fun=
>     ))
> mtext("Day2, PAR=1000", side = 3, line= -1, adj=0, at=1, cex=0.6) #subtitle
> 
> ....
> 
> #legends
> mtext("Ci", side = 1, line= 1, outer = TRUE, cex=0.7) #x legend
> mtext("Photosynthetic rate", side = 2, line= 1, outer = TRUE, cex=0.7) #y legend
> Thank you kindly for your support.
> 
> Clemence
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list