[R] Combining several mappings in ggplot2
hadley wickham
h.wickham at gmail.com
Tue Mar 25 18:08:27 CET 2008
On Tue, Mar 25, 2008 at 11:48 AM, Tribo Laboy <tribolaboy at gmail.com> wrote:
> Hello,
>
> I want to be able to make a plot that has several series with
> different color and linetype.
> Online documentation suggest that this is possible, but I haven't found how:
>
> "We can also create redundant mappings, mapping the same variable to
> multiple aesthetics. This is most useful when producing a graphic for
> both colour and black and white display."
>
> Here's what I have to get the color
> ggplot(data = Orange, aes(x = age, y = circumference, color = Tree)) +
> geom_line()
>
> if i try this I get an error:
> ggplot(data = Orange, aes(x = age, y = circumference, color = Tree,
> linetype = Tree)) + geom_line()
Please provide a reproducible example (or at least describe the
error!), otherwise we have no way to help you.
Hadley
--
http://had.co.nz/
More information about the R-help
mailing list