Add extra marker to the plot?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Steven
el 1 de En. de 2014
Comentada: Walter Roberson
el 2 de En. de 2014
Happy New Year!
How can I add extra marker to a plot with several curves?
I mean suppose that the plot with several curves has already the legend with different markers. Now I want to add extra marker to some of the curves.
How can I do so?
Thanks!
Steven
1 comentario
Respuesta aceptada
Walter Roberson
el 1 de En. de 2014
Editada: Walter Roberson
el 1 de En. de 2014
If you plot() with a linespec that has only a marker (or a marker and color) then the lines will not be drawn. Also scatter() will draw only markers.
plot(x, y, 'ro') %red circles but no line
To control the legends that result see http://www.mathworks.com/help/matlab/creating_plots/controlling-legends.html
2 comentarios
Walter Roberson
el 2 de En. de 2014
You would have to custom construct the second legend by creating an axes to put it in, drawing the sample lines, positioning the text, and so on.
Or alternately, you could put an second axis before the first and attach a legend to that second axis.
Más respuestas (0)
Ver también
Categorías
Más información sobre Line Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!