[R] axis labels disappear
Uwe Ligges
ligges at statistik.uni-dortmund.de
Sun May 23 13:19:23 CEST 2004
Angel Lopez wrote:
> When I do a plot, e.g.
> plot(1:10)
> and resize the window so that the x-axis becomes too small to hold all
> the x-axis labels, R automatically makes some of the labels disappear so
> that the remaining fit in the available space.
> I would like to be able to tell R which labels should not be removed.
>
> I've tried plotting the axis with axis() but this behaviour is still there.
> plot(1:10,xaxt="n")
> axis(side=1,at=1:10,labels=c("1","","","","5","","","","","10"))
>
> In my case when I resize the window first the "10" disappears and the
> the "5". Also if I start the graph with a 'small' window (e.g.
> X11(width=3,height=3) I do not get the "10".
> Is there a way to force that these labels are not removed automatically?
>
> I've searched the documentation but couldn't find any reference, Could
> anyone point me to the right documentation for this feature?
Well, I think you cannot suppress that behaviour entirely, instead, you
might want to just draw ticks and add labels with mtext()...
Uwe Ligges
> Thanks
> Angel
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list