Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Plot only every n'th dot, change from figure menu without extracting the data
1 回表示 (過去 30 日間)
古いコメントを表示
I have a figure with many curves on it. I wish to change the frequency of the dots only for some of the curves. Is there a way to do this directly (and simply) from the figure menum or the properties of the curve? Namely without having to extract the data into arrays (I only have the figure, not the original *.mat file)?
0 件のコメント
回答 (2 件)
Ameer Hamza
2018 年 6 月 8 日
編集済み: Ameer Hamza
2018 年 6 月 8 日
Yes, you can do that uses axes and line handles. For example, open the figure and run
ax = gca
it will give you the axes handle. If you then try
ax.Children
you will see an array of lines like this
ans =
2×1 Line array:
Line
Line
You can then change the XData and YData of each line individually. For example, to delete even index elements from the first line, try
ax.Children(1).XData(2:2:end) = [];
ax.Children(1).YData(2:2:end) = [];
0 件のコメント
Steven Lord
2018 年 6 月 8 日
If you're using release R2016b or later, use the findobj or findall functions to find the handle of the object created by plot then set the MarkerIndices property of that handle or those handles.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!