Plot problem while using "Markerindices"

Hello I am having a problem changing the plot properties when using Markerindices.. The error displayed is: Error using graph2d.lineseries/set The name 'Markerindices' is not an accessible property for an instance of class 'lineseries'. I hope somebody can help me out... Thank you
subplot(2,1,1)
h=plot(x1,y1,'k:',x2,y2,'k',x3,y3,'r--',x4,y4,'b:',x5,y5,'g-.')
set(h,'Markerindices',1:3:length(y1));
set(h,'linewidth',1)
h_legend=legend('z_{B}(initial)','z_{B}(measured)','z_{B}(k_{st}= 104 m^(1/3)/s','z_{B}(k_{st}= 84 m^(1/3)/s','z_{B}(k_{st}= 64 m^(1/3)/s','Location','northwest')
set(h_legend,'FontSize',7)
legend('boxoff')
xlabel('x [m]');
ylabel('y [m]');
title('Bed profile and Free Water Surface at t=6s');

 採用された回答

Guillaume
Guillaume 2017 年 7 月 16 日
編集済み: Guillaume 2017 年 7 月 16 日

0 投票

Matlab is case sensitive. The name of the property is MarkerIndices with a capital I, not Markerindices.

2 件のコメント

christian robledo
christian robledo 2017 年 7 月 16 日
Hello Guillaume. Thanks a lot for your answer. Unfortunately, i get the same error with your corrections....
Walter Roberson
Walter Roberson 2017 年 7 月 16 日
MATLAB is not case sensitive for property names when you use set()

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

その他の回答 (1 件)

Steven Lord
Steven Lord 2017 年 7 月 16 日

0 投票

What release are you using? The MarkerIndices property was introduced in release R2016b and will not be available if you're using an older release.

2 件のコメント

christian robledo
christian robledo 2017 年 7 月 16 日
Ok that makes sense then. Im using R2012a... there is no way then to change the properties of the plot in for that release?
Walter Roberson
Walter Roberson 2017 年 7 月 16 日
No, in previous releases if you only wanted the markers at selected locations, you had to scatter() them into place.

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

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by