tick2text: create easy-to-customize tick labels
by Kelly Kearney
20 Aug 2007
(Updated 27 Mar 2013)
Customized tick marks, maintained on zoom and pan
|
Watch this File
|
| File Information |
| Description |
This function allows for more versatile labeling of axis ticks. It offers two possible modifications: 1) automatic reformatting of tick labels based on a user-supplied format or function, and 2) conversion of tick labels to text objects.
The first option simply offers a shortcut to manual reformatting via the [X/Y/Z]TickLabel properties of axes. It also overrides the zoom/pan function of the axis so that ticks will update with your specified formatting as you zoom and pan.
With the second option, the original tick labels are removed, and new text objects are created that mimic x, y, and/or z tick labels. The text object format allows more modification (such as color, rotation, etc) than the original tick labels, and also allows TeX strings to be utilized in tick labels.
Update on 3/26/2013 includes changes to input syntax (no longer need to manually specify axis offsets, and adds convert-or-not option), as well as improved function. |
| Acknowledgements |
Format Tick Labels and Parse Pv Pairs
inspired this file.
|
| MATLAB release |
MATLAB 7.4 (R2007a)
|
| Other requirements |
Requires R2007a+ for zoom and pan |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 02 Mar 2009 |
Added function handle input option, corrected some bugs, and added new example |
| 04 Jun 2009 |
Fixed erroneous behavior when axes are logarithmically scaled |
| 30 Jun 2009 |
Added ability to modify x,y, and z ticks for 3D axes |
| 27 Mar 2013 |
- no longer need to manually specify axis offsets
- added simple reformat without conversion-to-text option
- more robust handing of non-default configured axes ([XYZ]Dir, [XYZ]Scale, and [XY]AxisLocation properties changed) |
| 27 Mar 2013 |
Credited parse_pv_pairs as a separate FEX entry |
|
Contact us