Matlap plot- linspec features
6 ビュー (過去 30 日間)
古いコメントを表示
plot(x,y,'-', 'color', cmap(jj,:));
Is there any way I can have matlab plot the data first and the use the linespec '-'?
0 件のコメント
回答 (1 件)
Steven Lord
2018 年 7 月 30 日
So you want to just call:
plot(x, y)
then change the plotted line to have a different line style or color? Call plot with an output, so you have a handle to the line, then change its properties.
x = 0:0.1:2*pi;
y = sin(x);
h = plot(x, y);
pause % So you can see how the plot looks before its properties change
h.Color = 'r';
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!