This question is a follow-up to this post: previous post
I have 12 variables, M1, M2, ..., M12, for which I compute certain statistics
library(reshape2)
df1 <- melt(df, id="model")
levels = seq(0.8, 1.2, 0.05)
ggplot(data=df1) +
geom_polygon(aes(x=model, y=value, group=variable, colour=variable), fill = NA) +
scale_colour_manual(values=c("a"="blue", "b"="red")) +
coord_polar() +
scale_y_continuous(limits=range(levels), breaks=levels, labels=levels) +
theme(axis.text.y = element_blank(), axis.ticks = element_blank(), axis.title.x = element_blank(), axis.title.y = element_blank())
You can remove the background from the legend by adding:
+ theme(legend.background=element_rect(colour=NA)
Don't forget to add an last closing parenthesis.