0

I wonder if there is a function like:

scale_color_hue()

but for shapes. Editing the labels of a legend when using colors in aes is esay with that function, but I cannot do it when mixing colors and shapes.

For instance, the command:

ggplot(subdata, aes(x=factor(rGPUs), y=Speedup, colour=factor(Factor), shape=factor(Factor), group=Factor, ymin=0)) +
  geom_line(size=1) + geom_point(size=4) +  
  scale_color_hue(labels = c("1X", "1.5X", "2X"))

generates this chart: enter image description here

I would like to plot it without the second legend. Nevertheless, I would not like to use the functions:

scale_color_manual()
scale_shape_manual()

since they need the labels together with the values, such as it is done in:

among many others.

Bub Espinja
  • 4,029
  • 2
  • 29
  • 46
  • 3
    Not sure if I'm missing something obvious, but what's wrong with simply adding `scale_shape_discrete(labels = c("1X", "1.5X", "2X"))`? You don't need to specify the values, just labels. – Z.Lin Jan 24 '18 at 14:45
  • You were right! I was looking for something like scale_shape_hue() and I didn't think of your solution. Thank you! – Bub Espinja Jan 24 '18 at 14:48

0 Answers0