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
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,
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
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
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?
5 matches
Mail list logo