FAQ
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", 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", 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 :-(

thanks a lot,

Arne
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

## Search Discussions

•  at Mar 10, 2002 at 5:45 pm ⇧

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", 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", 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)

If you don't specify the loactions manually the function pretty() will
be used in principle.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
•  at Mar 11, 2002 at 2:43 am ⇧
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", 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", 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)

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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
•  at Mar 11, 2002 at 8:19 am ⇧

Arne Mueller wrote:
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?
Yes. You can read out the recent values of "xaxp" for further use, but
setting them doesn't work for plot().

plot(1:10)
par("xaxp") # 2 10 4

What you can do is setting "xaxp" before using axis() as in:

plot(1:10, xaxt="n")
par(xaxp = c(3, 7, 5))
axis(1)

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
•  at Mar 11, 2002 at 11:31 am ⇧
Dear all,

Is there a bundled R-devel source?

Mehmet

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
•  at Mar 11, 2002 at 12:43 pm ⇧

"Mehmet Balcilar" <mbalcilar@yahoo.com> writes:

Is there a bundled R-devel source?
Yes, on

ftp://ftp.stat.math.ethz.ch/Software/R

--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

## Related Discussions

Discussion Overview
 group r-help categories r posted Mar 10, '02 at 5:01p active Mar 11, '02 at 12:43p posts 6 users 5 website r-project.org irc #r

### 5 users in discussion

Content

People

Support

Translate

site design / logo © 2018 Grokbase