line_fewer_markers

An alias of the LINE command, with additional control for markers, in number and location.

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Allows control of nr of markers, and positioning uniformly along x or along the curve, and with the option to lock on a local max.
Accept same inputs as the LINE command, with the additional parameter NUM_MARKERS, specifying how many markers to be plot.
Inspired by the first answer given by Ioannis Filippidis on
http://www.mathworks.com/matlabcentral/answers/2165-too-many-markers

Cite As

Massimo Ciacci (2026). line_fewer_markers (https://www.mathworks.com/matlabcentral/fileexchange/42560-line_fewer_markers), 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.5.0.0

same as 2 minutes ago

1.4.0.0

- Added support for logarithmic X spacing of markers
- Added example on how to use it with plotyy

1.3.0.0

- added compatibility for column vector input

1.2.0.0

Added option
'LegendLine','off'
to inhibit linestyle to show in legend.

1.1.0.0

- better formatted text indentation
- fixed few typos in comments
- added abbreviations for marker specs (mk,mks,mfc)

1.0.0.0