I use ggplot2 to make 10 lines and the color of those lines should be continuously changing, i.e. the color changes from light blue to dark blue. But I want the legend to be discrete.
The code is:
colnames(prop_combined) <- c('Q1', 'Q2', 'Q3', 'Q4', 'Q5', 'Q6', 'Q7', 'Q8', 'Qinf', 'Qhyb')
prop_combined_gg <- melt(prop_combined)
ggplot(data = prop_combined_gg, aes(x = Var1, y = value, group = Var2, color = Var2)) +
geom_line() +
geom_point() +
xlab(TeX("$tau$")) +
ylab("Power") +
labs(color=TeX("$\\gamma$"))
The output image looks like this:
Update: I want the image looks like:
But instead, the label should not be continuous