Why my `legend.text` and colour is not assigned properly in a second legend using `scale_linetype_manual` and `guides`?

The issue is that when using guide_legend you have to put pass color a vector of colors in the order they appear in the legend, i.e. the “High” color should come first, “Low” second, … As you provided no data, I could not check but

guides(linetype = guide_legend(override.aes = list(color = line_colors[c(3, 1, 2)]))

should give you the right colors for your linetype legend.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top