Hi Gafna Jeff,
In order to scale something manually you need to mention it in the aesthetics.
Assuming that you would like to vary line types by the factor 'cut'
the code below should work.
Since there are five factor levels, I added one more linetype
('dashed') in the manual command.
ggplot(diamonds, aes(depth, colour = cut, lty = cut)) +
scale_linetype_manual(values = c("dashed", "solid", "dashed", "solid",
"dashed")) +
geom_density()
Hope this helps,
Tom
---
Tom Fritzsche
University of Potsdam
Department of Linguistics
Karl-Liebknecht-Str. 24-25
14476 Potsdam
Germany
office: 14.140
phone:
+49 331 977 2296
fax:
+49 331 977 2095
email:
tom.fr...@uni-potsdam.de
web:
www.ling.uni-potsdam.de/~fritzsche
> --
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> Please provide a reproducible example:
https://github.com/hadley/devtools/wiki/Reproducibility
>
> To post: email
ggp...@googlegroups.com
> To unsubscribe: email
ggplot2+u...@googlegroups.com
> More options:
http://groups.google.com/group/ggplot2
>
> ---
> You received this message because you are subscribed to the Google Groups "ggplot2" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
ggplot2+u...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/ggplot2/CAABPRJen2BHzJrfB0jYCQtnZ53trciqJdvaO7yZBPi1CfCp2Ow%40mail.gmail.com.