set default line marker symbol
Mostrar comentarios más antiguos
how to set default line marker symbol to 'x' instead of none. Should be possible with:
set(0,'DefaultLineMarker','x');
still there are no markers in new plots. thanks!
Respuesta aceptada
Más respuestas (1)
dave grundy
el 20 de Jul. de 2020
1 voto
simon, the cyclist,
i came to the exact same conclusion as you both did regarding setting 'defaultLineMarker' and can't wait to hear from Mathworks as to why this doesn't work as we all thought it should.
i kept messing around with different options and was eventually able to get acceptable results instead using 'defaultAxesLineStyleOrder' such as:
set(0,'defaultAxesLineStyleOrder',{'-' '--o' '+'});
which will plot a series of solid lines, then a series of dashed lines with circle markers, and then a series using just + signs.
the aha moment came when i was looking at the Axes Properties documentation page:
in the Multiple Plots section, check out the explanation for LineStyleOrder, specifically it says:
"It changes to the next line style only after cycling through all the colors in the ColorOrder property with the current line style. The default LineStyleOrder has only one line style, '-'."
So, you can make it do what you want (i.e., plot only markers) but if you want to get a bit fancier, say, have markers AND colors change, as far as I can tell, that behavior is not possible and must be specified at each call to plot or line.
now, what i would really like to know is if we all stumbled upon a bug, and that, really, setting defaultLineMarker should do what we think...
Categorías
Más información sobre Annotations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!