Add plot markers to an existing plot

Add a specified number of markers to a plot

You are now following this Submission

Add a specified number of markers to a plot instead of a marker at each datapoint which is the default in Matlab

Cite As

Matthijs (2026). Add plot markers to an existing plot (https://www.mathworks.com/matlabcentral/fileexchange/23279-add-plot-markers-to-an-existing-plot), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.2.0.0

- Output handle now retains the linestyle from the input handle - useful for the legends
- The markers are spaced randomly so that they don't obscure eachother.
- Markers are added to the correct subplot

1.1.0.0

Number of makers is now optional with 5 markers being default.
The output handle is now also optional.

1.0.0.0