[R] xaxp and yaxp
Arne Mueller
a.mueller at cancer.org.uk
Mon Mar 11 03:43:13 CET 2002
Hello,
thanks for the reply, the axis command does exacly what I wanted.
Although I think it's a bit more complex than it realy has to be (?). I
mean why is there a 'xaxp' attribute if I have to calls the axis command
anyway?
regards,
Arne
Uwe Ligges wrote:
> Arne Mueller wrote:
>
>>Hello,
>>
>>I'm new to R, and I'm trying to set the number of tickmarks for a plot
>>using xaxp, but R seems to ignore this setting completely. Maybe you've
>>an idea what I'm doing wrong. I'm using R 1.4.1, and here's hat I'm
>>doing:
>>
>>
>>>d[,'seq']
>>>
>> [1] 28913 16323 13922 6237 4257 3881 4100 3781 2694 2064 1769
>>1550
>>[13] 1539 480
>>
>>
>>>d[,'scop.dup.rate']
>>>
>> [1] 97.7 95.3 95.3 88.5 84.6 84.6 84.7 82.8 71.5 74.9 74.9 71.2 67.8
>>54.9
>>
>>
>>>plot(d[,'seq'], d[,'scop.dup.rate'], col="red", pch=22, bg='red', cex=1.5, xlim = c(0,30000), ylim=c(20,100))
>>>
>>tick marks are placed at 0,5000, ... 30000 for the xaxis.
>>
>>now I'd like to have more tickmarks
>>
>>
>>>plot(d[,'seq'], d[,'scop.dup.rate'], col="red", pch=22, bg='red', cex=1.5, xlim = c(0,30000), ylim=c(20,100), xaxp=c(0,30000,13))
>>>
>>tickmarks are set the same way as above.
>>
>>Also par(xaxp=c(0,30000,13)) does not change anything ... :-(
>>
>>I'd like to have 13 tick marks on the x-axis including the extreme ones
>>(0 and 30000).
>>
>>I'm not sure whether I realy understand what xaxp is doing, so I thought
>>it may need the interval:
>>
>>par(xaxp=c(0,30000,2500))
>>
>>hm, but this doesn't change anything either :-(
>>
>
>
> In your case you should set the tickmarks manually using axis(), e.g.:
>
> plot(..., xaxt="n")
> axis(1, at=seq(0, 30000, length=13)
>
> If you don't specify the loactions manually the function pretty() will
> be used in principle.
>
>
> Uwe Ligges
>
>
>
--
Arne Mueller
Biomolecular Modelling Laboratory
Imperial Cancer Research Fund
44 Lincoln's Inn Fields
London WC2A 3PX, U.K.
phone : +44-(0)207 2693405 | fax :+44-(0)207-269-3534
email : a.mueller at icrf.icnet.uk | http://www.bmm.icnet.uk
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list