Reduce number of Markers on existing Matlab Figure

143 visualizaciones (últimos 30 días)
Garrett
Garrett el 27 de Oct. de 2019
Comentada: Mubashir Hussain Wani el 22 de Sept. de 2020
I have an existing set of figures that I cannot quickly and easily regenerate the plots for since they are created by different set of functions. There are a set of a thousand points that each show a marker, it is too dense as is, is there a way to reduce the number of markers on a plot without having to regenerate it.

Respuesta aceptada

Garrett
Garrett el 27 de Oct. de 2019
I figured it out.
Open the figure, go to Edit->Figure Properties
Click on the plot line you wish to edit the marker spacing.
Then go down to the 'Marker' option on the Property Inspector.
In the MarkerIndices box, it may say something to the effect of "1x1001 unit64"
You can create a vector here to modify the spacing.
In my case I wanted to have a marker every 50 points, so I entered [1:50:1000] into the MarkerIndices box, which solved my issue.
  4 comentarios
VIVEK CHAUDHARY
VIVEK CHAUDHARY el 4 de Ag. de 2020
@Garrett I tried using MArkerIndiceis but each time I try to input a vector, the MarkerIndicies property resets to 1x1001 unit64.
Mubashir Hussain Wani
Mubashir Hussain Wani el 22 de Sept. de 2020
@Vivek - In MATLAB 2018 onwards omit the use of brackets '[]' - just provide the indices e.g. 1:10:100.

Iniciar sesión para comentar.

Más respuestas (1)

Steven Lord
Steven Lord el 27 de Oct. de 2019
If you created your plots using the plot function, set the MarkerIndices property of the lines created by plot. See the "Revert to Default Marker Locations" example on this documentation page to see how to set this property on a line that already exists.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by