The similar questions gave solutions on how to change legend labels, by using scale_color_manual
like this:
scale_fill_manual(name = "title", values = c("red","orange","blue","green"),
labels = c("1","2","3","4"))
Problem is, this method forces you to put the colors you want for the legends. If I put just labels, it won't work. How can I change the labels and keep the colors the same.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.