Re: [R] how to plot a graph with different pch

2007-10-02 Thread Greg Snow
enter Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Letticia Ramlal > Sent: Monday, October 01, 2007 12:34 PM > To: [EMAIL PROTECTED] > Subject: [R] how to plot a graph with

Re: [R] how to plot a graph with different pch

2007-10-01 Thread hadley wickham
You might find it easier to use the ggplot2 (http://had.co.nz/ggplot2) package: install.packages("ggplot2") library(ggplot2) qplot(mpg, wt, data=mtcars, colour=factor(cyl)) # or qplot(mpg, wt, data=mtcars, shape=factor(cyl)) ggplot2 takes care of mapping the variable values to colours and sizes,

Re: [R] how to plot a graph with different pch

2007-10-01 Thread Charles C. Berry
On Mon, 1 Oct 2007, Letticia Ramlal wrote: > I am trying to plot a graph but the points on the graph should be > different symbols and colors. It should represent what is in the legend. > I tried using the points command but this does not work. WHAT "does not work" ??? points() puts points on a

Re: [R] how to plot a graph with different pch

2007-10-01 Thread Henrique Dallazuanna
Perhaps plot(mtcars$wt,mtcars$mpg,xlab= "Weight(lbs/1000)", ylab="Miles per Gallon", pch=c(3,17,19), col=c("blue", "red", "purple4")) On 01/10/2007, Letticia Ramlal <[EMAIL PROTECTED]> wrote: > > I am trying to plot a graph but the points on the graph should be > different symbols and colors. I

[R] how to plot a graph with different pch

2007-10-01 Thread Letticia Ramlal
I am trying to plot a graph but the points on the graph should be different symbols and colors. It should represent what is in the legend. I tried using the points command but this does not work. Is there another command in R that would allow me to use different symbols and colors for the points?