Home > Software design >  R: linetype and color manual not showing in ggplot legend
R: linetype and color manual not showing in ggplot legend

Time:03-27

I'm plotting the following data (stored as data.frame object) as ROC-AUC plot using ggplot. I want to display each data in unique linetype and color and arrange them into a legend inside the plot, so I referenced this pic

CodePudding user response:

If this is only happening in your plot panel, try ggsave for example.

In my plot panel, it looked the same as in your picture:

enter image description here

However, after saving it in a folder, I get colors and linetypes:

enter image description here

  • Related