On 9/18/08, Saptarshi Guha <[EMAIL PROTECTED]> wrote:
> Hello,
>         My plot has two curves on different scales. To create the scale on
>  the extreme right hand side of a panel
>  I followed the example in panel.axis (in this example, the tick marks
>  are at the same location and labels are the same too)
>
>         axis=function(side, ... )
>         {
>           ylim <- current.panel.limits()$ylim
>           if(side=="left"){
>             prettyC=c(pretty(ylim))
>             panel.axis(side = side,
>  at=prettyC,tck=1,text.cex=0.7,outside = TRUE)
>             }
>           else if(side=="right"){
>             prettyC=c(pretty(ylim))
>             panel.axis(side = side, at=prettyC, tck=1,outside =
>  TRUE,text.col='grey32',text.cex=0.7)
>           }
>           else {
>             axis.default(side = side, ...)
>           }
>         }
>
>  However, all I see are the tick marks and the text gets clipped. I'm
>  aware that this might happen (as pointed out in the help page)
>  but how can I get around it? Should I specify a width to the device?

You mean the example on ?axis.default? (panel.axis doesn't have any
examples.) Look at the example after that, which uses
yscale.components.default. This one should take care of spacing (if
you have a recent enough version of lattice).

-Deepayan

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to