File Exchange

image thumbnail


version 1.0.1 (2.63 KB) by Tuan Pham
"despline/offset" x- and y- axis, inspired by 'offsetAxes' by Anne Urai, but taking into account log scale

1 Download

Updated 25 Oct 2019

View License

despline(ax, offsetfactor)
ax: axes handle
offsetfactor: can be a number or 2-element vector ([x,y])
despline(ax); % offsetfactor = 1
despline(offsetfactor) % ax = gca
despline([ax1, ax2, ...])
despline([ax1, ax2, ...], offsetfactor)
despline(fig_handle, offsetfactor)
despline('all') % 'all' is equil to all axes in gcf
despline('all', offsetfactor)

Inpiration: offsetAxes by Anne Urai, 2016

Modified by Tuan Pham, 2019
- Oct 06, 2019: fixes to adapt to log scale, add offsetfactor
- Oct 25, 2019: fixes minor bugs
- For stable usage, set the limits and scales of the axes before using.
Minor ticks still unstably controlled (unnecessary minor ticks may
disappear after the first limit setting - meaning may not redrawing
minor ticks smaller than lower bound of limit)
- Currently not including Z axis

Cite As

Tuan Pham (2019). despline (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)



fixes minor bugs about minorticks

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: offsetAxes(ax)