Generating a Legend for Colormap
31 views (last 30 days)
I have several lines plotted on one graph that are color-coded by a colormap. I want to add a legend (not colorbar) that idenitifies each of the lines by their color. The colormap is working and the legend is generated, by the markers in the legend are all black. Here is what I have
cm = jet(size(x_mtx))
leg_label(i,:) = sprintf('%1.2e',rmse_mtx(i,1));
How can I color the legend with the color corresponding to the line plotted?