I am calling plot() with argument pch as a vector of numeric
symbol codes, the same length as x and y. Is there some code
which produces no symbol - a blank - so that I can come back
with a second call to points() and fill in these locations
using a different fill color and a different symbol size ?
There's always a work-around, but both x and y are generated
on the fly by calls to cumsum(), so it's inconvenient to put
NAs into either x or y to suppress plotting that way. Guess
I should *try* mixing numeric and character symbol codes,
although the example in help("points") explicitly uses a list
at that point.
THX - tom blackwell - u michigan medical school - ann arbor -
Don't know why you need to do that, as it seems to me that's why you pass a vector to pch, etc., so you won't have to come back and use points(). Anyway, using NA would work. (However, I suspect I still don't understand your problem.) Andy> -----Original Message----- > From: tblackw at umich.edu [mailto:tblackw at umich.edu] > Sent: Monday, May 05, 2003 4:23 PM > To: r-help at stat.math.ethz.ch > Subject: [R] null plotting symbol ? > > > > I am calling plot() with argument pch as a vector of numeric > symbol codes, the same length as x and y. Is there some code > which produces no symbol - a blank - so that I can come back > with a second call to points() and fill in these locations > using a different fill color and a different symbol size ? > > There's always a work-around, but both x and y are generated > on the fly by calls to cumsum(), so it's inconvenient to put > NAs into either x or y to suppress plotting that way. Guess > I should *try* mixing numeric and character symbol codes, > although the example in help("points") explicitly uses a list > at that point. > > THX - tom blackwell - u michigan medical school - ann arbor - > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >
NAs in pch cause the corresponding points to be omitted. On Mon, 5 May 2003 tblackw at umich.edu wrote:> I am calling plot() with argument pch as a vector of numeric > symbol codes, the same length as x and y. Is there some code > which produces no symbol - a blank - so that I can come back > with a second call to points() and fill in these locations > using a different fill color and a different symbol size ? > > There's always a work-around, but both x and y are generated > on the fly by calls to cumsum(), so it's inconvenient to put > NAs into either x or y to suppress plotting that way. Guess > I should *try* mixing numeric and character symbol codes, > although the example in help("points") explicitly uses a list > at that point.-- Brian D. Ripley, ripley at 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
tblackw at umich.edu writes:> I am calling plot() with argument pch as a vector of numeric > symbol codes, the same length as x and y. Is there some code > which produces no symbol - a blank - so that I can come back > with a second call to points() and fill in these locations > using a different fill color and a different symbol size ? > > There's always a work-around, but both x and y are generated > on the fly by calls to cumsum(), so it's inconvenient to put > NAs into either x or y to suppress plotting that way. Guess > I should *try* mixing numeric and character symbol codes, > although the example in help("points") explicitly uses a list > at that point.Doesn't NA work there?? plot(1:10,pch=c(1:4,NA,6:10)) works for me on Linux, but there could be device dependencies. -- 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
pch = 26 seems to produce a blank symbol.
Prof Brian Ripley <ripley@stats.ox.ac.uk>
Sent by: r-help-bounces@stat.math.ethz.ch
05/05/2003 04:39 PM
To: tblackw@umich.edu
cc: r-help@stat.math.ethz.ch
Subject: Re: [R] null plotting symbol ?
NAs in pch cause the corresponding points to be omitted.
On Mon, 5 May 2003 tblackw@umich.edu wrote:
> I am calling plot() with argument pch as a vector of numeric
> symbol codes, the same length as x and y. Is there some code
> which produces no symbol - a blank - so that I can come back
> with a second call to points() and fill in these locations
> using a different fill color and a different symbol size ?
>
> There's always a work-around, but both x and y are generated
> on the fly by calls to cumsum(), so it's inconvenient to put
> NAs into either x or y to suppress plotting that way. Guess
> I should *try* mixing numeric and character symbol codes,
> although the example in help("points") explicitly uses a list
> at that point.
--
Brian D. Ripley, ripley@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
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
[[alternate HTML version deleted]]
I presumed the original poster wanted a blank symbol (which could also be
any character plotted in the background color). The point was that pch =
26 does produce blank since it is unassigned. However, using NA would be a
better solution.
Prof Brian Ripley <ripley@stats.ox.ac.uk>
05/06/2003 08:04 AM
To: partha_bagchi@hgsi.com
cc: r-help@stat.math.ethz.ch, <tblackw@umich.edu>
Subject: Re: [R] null plotting symbol ?
On Tue, 6 May 2003 partha_bagchi@hgsi.com wrote:
> pch = 26 seems to produce a blank symbol.
More accurately, it plots nothing. (A `blank' symbol' suggests to me
that
it plots in the background colour.) That is true *currently* (26-31 are
unassigned), but there is no guarantee that will remain so.
Why would one use that rather than NA, whose meaning is clear?
In brief: what exactly was your point? Were you seriously suggesting
using pch=26?
> Prof Brian Ripley <ripley@stats.ox.ac.uk>
> Sent by: r-help-bounces@stat.math.ethz.ch
> 05/05/2003 04:39 PM
>
>
> To: tblackw@umich.edu
> cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] null plotting symbol ?
>
>
> NAs in pch cause the corresponding points to be omitted.
>
> On Mon, 5 May 2003 tblackw@umich.edu wrote:
>
> > I am calling plot() with argument pch as a vector of numeric
> > symbol codes, the same length as x and y. Is there some code
> > which produces no symbol - a blank - so that I can come back
> > with a second call to points() and fill in these locations
> > using a different fill color and a different symbol size ?
--
Brian D. Ripley, ripley@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
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
[[alternate HTML version deleted]]