Re: [R] How to define specific location of tick marks in plot()

About this list Date view Thread view Subject view Author view Attachment view

From: DJNordlund@aol.com
Date: Sun 23 May 2004 - 06:58:53 EST


Message-id: <5a.2bcc0e94.2de1190d@aol.com>

Thanks to Prof. Ripley for the rapid response and solution. The R
developers and contributors to this list are very helpful and generous with their time
and advice.
Dan Nordlund
In a message dated 5/22/2004 11:41:13 AM Pacific Daylight Time,
ripley@stats.ox.ac.uk writes:
On Sat, 22 May 2004 DJNordlund@aol.com wrote:

> I wish to create a series of plots with the same x-axis range and the
> same placement of tick marks. In addition I want to force the tick
> marks to be at specific locations. For example, if I wish to have an
> x-axis which goes from 40 to 110, with tick marks at 40, 50, 60, ... ,
> How can I accomplish that? The various parameters I have tried changing
> just seem to be suggestions for an internal definition.
>
> I'm sure this is easy, but I'm obviously missing something in the
> docmentation.

par(xaxs="d") is what you want, but it is not currently implemented. So
for now use xaxt="n" and then call axis() with at=.

plot(20:120, 20:120, xaxt="n")
axis(1, at = seq(40, 110, 10))

-- 
Brian D.  Ripley,                   ripley@stats.ox.ac.uk
Professor of Applied Statistics,   http://www.stats.ox.ac.uk/~ripley/
University of  Oxford,              Te:  +44 1865 272861 (self)
1 South Parks  Road,                      +44 1865 272866 (PA)
Oxford OX1 3TG,  UK                 Fax:  +44 1865 272595

______________________________________________ R-help@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


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:12 EST