set default line marker symbol

46 visualizaciones (últimos 30 días)
Simon Hager
Simon Hager el 27 de Mzo. de 2020
Respondida: dave grundy el 20 de Jul. de 2020
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

the cyclist
the cyclist el 28 de Mzo. de 2020
Editada: the cyclist el 28 de Mzo. de 2020
See this answer from Mathworks support.
  3 comentarios
the cyclist
the cyclist el 30 de Mzo. de 2020
From this documentation page, I would have expected
set(groot,'defaultLineMarker','x')
to do what you want, but it doesn't seem to do it.
I verified that
set(groot,'defaultLineMarkerSize',60)
does make the size larger. I'm puzzled.
Simon Hager
Simon Hager el 30 de Mzo. de 2020
It' the same with me!

Iniciar sesión para comentar.

Más respuestas (1)

dave grundy
dave grundy el 20 de Jul. de 2020
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...

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by