grad student
unread,Aug 18, 2011, 2:55:05 PM8/18/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Hello!
I've tried searching far and wide for a solution to this but,
admittedly, I am relatively new to ggplot and am not sure where the
issue lies.
I have successfully changed line colours and types together for
various line plots but for some reason just can't get it both to work
for these rose-type diagrams I'm trying to do. I can successfully
change the colour of the lines but I just can't change the line type.
They all turn out as solid lines.
I'm assuming the problem lies within how I'm using coord_polar or
geom_freqpoly but would appreciate any insight.
ggplot(tmp, aes(x = heading, fill=Class, colour=Class)) +
xlab(NULL) + ylab(NULL) +
geom_freqpoly() +
coord_polar() +
facet_wrap(~date, ncol=7) +
scale_colour_manual(values = c("black","gray","black")) +
scale_linetype_manual(values = c(1,1,2)) +
scale_x_continuous(limits = c(0, 360), breaks = c(0, 90, 180, 270)) +
theme_bw() +
opts(strip.text.x = theme_text(size=14)) +
opts(strip.background = theme_rect(fill = 'white'))