Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Plot only every n'th dot, change from figure menu without extracting the data
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Ameer Hamza
am 8 Jun. 2018
Bearbeitet: Ameer Hamza
am 8 Jun. 2018
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 Kommentare
Steven Lord
am 8 Jun. 2018
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 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!