[R] xyplot lattice fine control of axes limits and thick marks (with log scale)

maxbre mbressan at arpa.veneto.it
Wed Apr 11 12:28:34 CEST 2012


hi, I just realised I want to go a little further in the control of the chart
appearance and I would like to have the same number of ticks displayed in
both axes of all panels

given this code....

xyplot(tv ~ ms | sub_family, data=tm, 
      #as.table=TRUE, 
      aspect="xy", 
      xlab = expression(paste('ms [ fg/', m^3, ' ]', sep = '')), 
      ylab = expression(paste('tv [ fg/', m^3, ' ]', sep = '')), 
      scales= list(x=list(relation="free", log=10, cex=0.8), 
                   y=list(relation="free", log=10, cex=0.8)), 
      prepanel = function(x, y, subscripts) { 
        rr<- range(cbind(x,y)) 
        list(xlim = rr, ylim= rr) 
      }, 
      panel = function(x, y ,subscripts,...) { 
        panel.xyplot(x, y, cex=0.8,...) 
        panel.abline(a = 0, b = 1, lty = 2, col ="gray") 
        panel.text(x, y, labels=tm$name_short[subscripts], cex = 0.8, pos=3,
offset=0.5, srt=0, adj=c(1,1)) 
      },  
 subscripts=TRUE, 
      xscale.components = xscale.components.logpower, 
      yscale.components = yscale.components.logpower 
      ) 

...I have been trying to insert in the 'prepanel' and also in the 'panel'
the statement 'tick.number=5' but this does not seem to have any effect

some useful hints for this?

thanks a lot




--
View this message in context: http://r.789695.n4.nabble.com/xyplot-lattice-fine-control-of-axes-limits-and-thick-marks-with-log-scale-tp4511897p4548502.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list