How to remove lines from legends in ggplot?
问题 I've read a few posts about this, but didn't find the right solution for my problem. Because the dashed line from geom_vline is vertical, it's also shown that way in the legend. On top of that, the short-dashed lines also get a vertical partner which is really not necessary. Is it possible to get only horizontal lines for both the colours and the types? It would make the legend much clearer. As my code is based on a large dataset, I made a simple short variant to show here. # data (example)