Be the first to rate this file! 9 Downloads (last 30 days) File Size: 615 Bytes File ID: #22433
image thumbnail

correct tick label

by benharper1977

 

13 Dec 2008

set x tick label in a desired format and maintain it when zooming, panning or using data cursor

| Watch this File

File Information
Description

called after plot command, set x tick label in a desired format (e.g. integer) and maintain it when zooming, panning or using data cursor to retrieve point information

i made it only for x tick label.. if you want it for y label i guess you just have to copy and paste the lines regarding the SET command for xticklabel and xtick and change it with yticklabel and ytick.

if you need different data format (e.g. fixed precision instead of integer) just change the %d with your desired format (please refer to the sprintf command help in matlab).

hope this will help you!

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
zoomfixticks

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
zoom Cristina McIntire 15 Dec 2008 15:16:34
pan Cristina McIntire 15 Dec 2008 15:16:34
data cursor Cristina McIntire 15 Dec 2008 15:16:34
data exploration Cristina McIntire 15 Dec 2008 15:16:34
format Cristina McIntire 15 Dec 2008 15:16:34
fix benharper1977 15 Dec 2008 15:16:42
data exploration benharper1977 15 Dec 2008 15:16:42
data cursor benharper1977 15 Dec 2008 15:16:42
tick benharper1977 15 Dec 2008 15:16:42
ticklabel benharper1977 15 Dec 2008 15:16:42
zoom benharper1977 15 Dec 2008 15:16:42
pan benharper1977 15 Dec 2008 15:16:42
format benharper1977 15 Dec 2008 15:16:42
data cursor James 13 May 2010 10:10:58

Contact us at files@mathworks.com