File Exchange

image thumbnail

ticklabelinside

version 1.0.0.0 (2.83 KB) by Andrew Bliss
Moves tick labels to the inside of the plot axis.

2 Downloads

Updated 18 Apr 2013

View License

HH=TICKLABELINSIDE(H,AX,CORNERFLAG) is the calling form.
HH contains handles to the text objects created.
H is the handle to the figure or axis of interest (default is GCF).
AX is 'x' 'y' or 'xy' (default) to indicate which axis labels should be moved in.
CORNERFLAG is 1 to print labels at the corners, 0 to skip them for clarity (default)

Cite As

Andrew Bliss (2020). ticklabelinside (https://www.mathworks.com/matlabcentral/fileexchange/41371-ticklabelinside), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

rokP

Nice func. Thank you KAB. Does not work well with plotyy, it puts the left axis labels inside, but deletes the right axis labels.

KAB

Had to change line 110 to:
ticklabeldbl=str2double(ticklabel);
from
ticklabeldbl=str2num(ticklabel);
to get function to work in R2015a. Otherwise worked well.

Also would be nice if it handled YDir = reverse, XDir = reverse.

Good for plots with default settings.

Improvement request: please add support for XAxisLocation = top, YAxisLocation = right.

Igor

Works OK, but only till you try to zoom.

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