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

View License

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

Cite As

Massimo Ciacci (2024). line_fewer_markers (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Change Markers in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes

same as 2 minutes ago

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

- added compatibility for column vector input

Added option
to inhibit linestyle to show in legend.

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