Skip to content

lattice: scales beginning at zero with relation="free"

2 messages · wolfram at fischer-zim.ch, Deepayan Sarkar

#
Is there an easy way to have scales beginning with zero and
ending with the local maximum data value of each panel
when using a lattice function with ``scales=list( relation="free" )''?

Thanks. Wolfram
#
On Tuesday 10 February 2004 11:27, Wolfram Fischer wrote:

            
Add 

prepanel = function(x, y, ...) list(xlim = c(0, max(x)), ylim = c(0, max(y)))

If you want this for only one of the axes, just leave out the other component. 
If you want to suppress the automatic extension of the limits, you need to 
add axs = "i" in the appropriate component of scales.

Deepayan