plotsparsemarkers

A function that adds only a few markers to lines in an existing plot rather than 1 per x-value.
594 download
Aggiornato 22 mag 2018

Visualizza la licenza

[h =] plotsparsemarkers(hp, hl, markerStyle[, numberOfMarkers = 6 [,staggered = true]])
The function takes the handle returned from a plot call and adds a few markers along each line rather than the default of one marker per x-value.
The type of marker has to be given for each line you want a marker on.

The legend is also updated assuming that the handle to it is given.

For plots with multiple lines the markers are staggered between the lines so that they wont exactly line up (and possibly cover each other). This feature can be turned off if you want aligned values.

The function returns a handle to the new "lines" to allow further manipulation.

plotsparsemarkersdemo.m is a simple demonstration of the functionality. It should be very easy to get up and running with this.

Cita come

Jacob Jonsson (2026). plotsparsemarkers (https://it.mathworks.com/matlabcentral/fileexchange/37165-plotsparsemarkers), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2009b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Two y-axis in Help Center e MATLAB Answers
Versione Pubblicato Note della release
1.1.0.0

Made code compatible with 'MarkerIndices' attribute of the lines instead of old way. Not sure in which version this was added, the split is hard coded in the statement
if str2num(relstr(1:4)) > 2012
change 2012 if needed. Kept interface the sam.

1.0.0.0