I use MATLAB to build some data. I would like to create a legend so that it divides the information into two types, for example Type1 and Type2. Each data type has several specific rows of data that I draw. Let's pretend that:
- Type1 data has row 1 and row2
- Type 2 data has row1 and row2 and row3
This would make a 5-line plot. Now for the legend, I can do something like:
legend('Type1: line1','Type1: line2','Type2: line1', ... 'Type2: line2','Type2: line3');
But this repeats the βTypesβ, and the best way is what it will look like:
(final conclusion of the legend)
Many thanks. I hope you can help with my first question: D
source share