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 -
null plotting symbol ?
4 messages · tblackw@umich.edu, Brian Ripley, Peter Dalgaard +1 more
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
The following produced symbols of different shapes, sizes, and colors in R 1.6.2: plot(1:4, pch=1:4, col=1:4, cex=1:4) The same command to S-Plus 6.1 generated a plot with one symbol, color and size, complaining, "Too many values for parameter" pch, col, and cex. hth. spencer graves
Peter Dalgaard BSA wrote:
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.