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!

 採用された回答

the cyclist
the cyclist 2020 年 3 月 28 日
編集済み: the cyclist 2020 年 3 月 28 日

1 投票

See this answer from Mathworks support.

3 件のコメント

Simon Hager
Simon Hager 2020 年 3 月 30 日
編集済み: Simon Hager 2020 年 3 月 30 日
Tanky you!
My question is then: How can I change something like the default line marker for "high-level functions" like plot?
the cyclist
the cyclist 2020 年 3 月 30 日
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 2020 年 3 月 30 日
It' the same with me!

サインインしてコメントする。

その他の回答 (1 件)

dave grundy
dave grundy 2020 年 7 月 20 日

1 投票

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...

カテゴリ

製品

リリース

R2019b

タグ

質問済み:

2020 年 3 月 27 日

回答済み:

2020 年 7 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by