Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Plot only every n'th dot, change from figure menu without extracting the data
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (2)
Ameer Hamza
le 8 Juin 2018
Modifié(e) : Ameer Hamza
le 8 Juin 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 commentaires
Steven Lord
le 8 Juin 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 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!