[R] ploting axes and rotating strings

partha_bagchi@hgsi.com partha_bagchi at hgsi.com
Wed Oct 27 16:36:41 CEST 2004


Have you tried the adj parameter in par as in 

axis(side=3,at=0:100/100,labels=0:100,las=2,cex.axis=0.1, adj = 0.5)

?







Ales Ziberna <ales.ziberna at guest.arnes.si>
Sent by: r-help-bounces at stat.math.ethz.ch
10/27/2004 09:34 AM

 
        To:     "R-help" <r-help at stat.math.ethz.ch>
        cc: 
        Subject:        [R] ploting axes and rotating strings


Hello!

I have two question that rose from trying to tacle the same problem in two
differnet ways.

What I want to do is to plot axes (only values or labels, no tick marks) 
in
such a way that 'cex' can be very small, text can be perpendicular to the
axis (as in axis(las=2) ) and the text is stil at the right position.

Let me demonstrate with a small example:
plot(0:100/100,0:100/100,axes=FALSE)
axis(side=3,at=0:100/100,labels=0:100,las=2,cex.axis=0.1)

The text on the axis should be at the same points as tick marks, but it is
shifted right.
I tried to bypas the problem by using function 'text', which puts the text
at the correct positions, however, it has another problem. I would like to
rotate the text, but if I use 'str=90' (to rotate the text for 90 
degrees),
I get a warning massage:
Warning message:
parameter "str" couldn't be set in high-level plot() function

This suprises me, since if I read the help correctly ('?par'), then this
should not happen.

So if anyone can either hepl me to rotate the text in 'text' or to 
correctly
plot the text in 'axis', I would be very grateful.

Ales

______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.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