In case any of you are trying to plot years in this
way, please note that the suggestion by Li doesn't
work.
Here are some recent emails that I have received.....
- Nirmala
--- Yuelin Li <yuelin(a)mail.med.upenn.edu> wrote:
Date: Tue, 7 Jan 2003 09:32:34 -0500 (EST)
From: Yuelin Li <yuelin(a)mail.med.upenn.edu>
Subject: Re: [R] plot()
To: ripley(a)stats.ox.ac.uk
CC: n_ravishankar(a)yahoo.com
Hi, Prof. Ripley,
You are right, my example was wrong. I had thought
that Nirmala
wanted to plot the text. My mistake. Thanks,
Yuelin Li.
----
This is not going to work. There are five x
values,
irregularly spaced.
On Mon, 6 Jan 2003, Yuelin Li wrote:
try text(c("1970", "1978",
"1990"), x=1:3,
y=1:3) after you
first
call plot(c(1, 3), c(1, 3), axes=F,
type="n",
xlab="",
ylab="")
to set the plotting area.
Yuelin.
-- From: Nirmala Ravishankar
<n_ravishankar(a)yahoo.com>
To: r-help(a)stat.math.ethz.ch
Subject: [R] plot()
Date: Mon, 6 Jan 2003 20:19:58 -0800 (PST)
I am an R novice trying to figure out plot().
Specifically, I am trying to plot the values
of a
numeric variable V for a set of years (1970,
1974,
1976, 1978, 1980). How do I get R to label
the years
I am plotting on the x-axis rather then some
general
levels (1970, 1975, 1980.) Using
as.character(year)
doesn't seem to help, and using
as.factor(year)
generates steps insteads of dots.
Help will be most appreciated. I have listed
the code
I have been using below:
plot(y$year, y$V, type = "b")
plot(as.character(y$year), y$V, type = "b")
plot(as.character(y$year), y$V, type = "b")
Thanks,
NR
______________________________________________
R-help(a)stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________
R-help(a)stat.math.ethz.ch mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
--
Brian D. Ripley,
ripley(a)stats.ox.ac.uk
Professor of Applied Statistics,
http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865
272861 (self)
1 South Parks Road, +44 1865
272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865
272595
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.