When use the example on p. 108 of the Wickam "ggplot2" text,Ā and inlcude the follwoing line:Ā plotĀ + aes(linetype=vore) + scale_linetype_manual(value=c(0,1,2,3,4))Āthe output plots no lines.I must be using the manual function incorrectly.ĀAny suggestions?ĀĀ Ā--
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
Thanks for the reply.
I must be doing something wrong.
Ā
When I enter the following :
Ā
plotĀ + aes(shape=vore) + scale_shape_manual(value=c(1,2,6,0,23))
Ā
the data are plotted with five different symbols, one for each of five groups.
Ā
When the change is made from shapes to linetypes,
Ā
plotĀ + aes(linetype=vore) + scale_linetype_manual(value=c(0,1,2,3,4))
Ā
no lines appear.Ā The values 0,1,2,3,4 are allowed identifiers for different kinds of lines. I am confused.
Ā
That is my problem.Ā Any thoughts?
plot <- qplot(brainwt, bodywt, data=msleep, log=āxyā)
Ā
does this help?
It happens that I need to put both symbols and lines on the plot, and I need to be able to choose the lines and symbols that are assigned.Ā I seem to need to use scale_shape_manual and Ā scale_linetype_manual to correctly set the desired symbols and Ā lines, but the following code does not work with regard to the lines.Ā Any suggestions?
##the following code seems to remove all nas for all variables used, I think. Ā Ā
ms <- msleep[ !is.na(msleep$vore) & !is.na(msleep$brainwt)Ā & !is.na(msleep$bodywt),]
q1 <-Ā qplot(brainwt,bodywt,data=ms)
q2 <- q1 + aes(shape=vore) + scale_shape_manual(value=c(1,2,6,0))
q3 <- q1 + aes(linetype=vore) + scale_linetype_manual(value=c(0,1,2,3))
q4 <- q2 + aes(linetype=vore) + scale_linetype_manual(value=c(0,1,2,3))
Ā
Also, how do I iissue an github?
Thanks