r - Delete one aes from legend generated from two layes sharing common aes name -
My question is that I want to overlay a scatter plot at the top of a line plot and change the color of these two plots. With a variable I want to keep the legend for only one color, if I use An example of a copy is: setting scale_colour_discrete (guide = "none") then will both have gone.
Library (reshape2) IRIS2 and LT; - Melt (iris, id.over = "species") GG Plot (Iris 2, AES (X = Variable, Y = Value, Group = Species)) + GOM_point (AES (Color = IFLSE (Value <3, "Type I want to show the legend for 'species' rather than just type.
show_guide = FALSE in the geom_point layer,
GEGPlot (IIS2, AES (X = variable, Y = value, group = species)) + GOM_point (AES (color = FLSE (value <3, "type1", "type2")), Show_guide = False) + Geom_line (AES (color = species)) + scale_colour_discrete ("species", breaks = level (iris 2 $ species))
Comments
Post a Comment