How can I set spacing between markers in a plot?

3 次查看(过去 30 天)
I have problem with setting marker spacing in a plot. I have two plots for the same curve to create marker at known distance, but I only want one legend that is a combination of the two '-dr'. How can I achieve this? I havetried to use "line_fewer_markers" but it did not work. Let us say I have: x=[1 3 5 7 9 11]; y=[1 2 6 18 30 31]; figure(1) hold on h1=plot(x,y,'-r'); h2=plot(x(1:2:end),y(1:2:end),'dr'); legend(......

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by