I have a figure where I had some plots trough different functions using hold on
.
When I want to create my Legend, I don't have access to all the handle of my figures.
Is there a way to create an independent Legend by defining the tip of the plot and the string for the description?
For example I would like to be able to do:
figure;
plot(0:0.1:pi, sin(0:0.1:pi), 'b-');
customLegend('r.', 'red dots');
In the previous version it was possible to create a virtual plot using:
h1 = plot([], [], 'r.');
legend(h1, 'red dots');
For example I want to change from the image of the left to the image of the right: