dashLine

Create custom dash lines with any sequence of dashes
154 Downloads
Updated 19 Aug 2015

View License

The title is self-explanatory. This function actually converts a point sequence into several new point sequences. To visualize the line afterwards, you must plot using a full line. Inputing the current axis into the function allows you to specify the dash(es) and space(s) lengths in points instead of data units, and respects the on-screen data ratio.

Cite As

Joss Duchateau (2024). dashLine (https://www.mathworks.com/matlabcentral/fileexchange/52563-dashline), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Line Plots 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
1.2.0.0

Changed the functions a bit to handle semilog and loglog plots

1.1.0.0

Added the convertDash routine which makes conversion from standard LineStyles to custom dashes easy.
Just plot in a standard way with a 'Tag' argument of your choice and use convertDash('tagname', dashsize, spacesize) to convert plot and legend.

1.0.0.0