Describe to plots in one line in legend
Ältere Kommentare anzeigen
Hey,
I have a plot full of lines and to not overload the legend I wanted to only describe some major differences between the lines in the legend and the other differenced in a caption. Therefore I need to adapt the legend in a way I dont know how to.
I have plotted 10 lines, always paired two lines with the same color, but differet in linestyle (- and --). In the legend I only want to explain the difference in color and the difference between the linestyle in a caption. To avoid confusion I want to name the different linestyle plots in the same line in the legend, but with the correct linestyle.
e.g:
- /-- (- and -- in color and linstyle like in plot) max values
- /-- (- and -- in color and linstyle like in plot) mean values

But I dont know how to make the linestyle and color of two different plot apear in the same line.
If there is a possibility to do so, maybe someone could tell me how.
Many Thanks in advance
Best regards
1 Kommentar
dpb
am 11 Jan. 2021
I'd guess fiddling around with NumColumns=2 and the line order and label content will be best can do with legend directly. Whether you can actually manage something that looks presentable or not I don't know; didn't have time to actually try anything.
Another approach is illustrated at following Answer https://www.mathworks.com/matlabcentral/answers/49027-how-to-manipulate-plot-legend-to-show-markers-and-colours-seperatly#
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Legend finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

