Code covered by the BSD License  

Highlights from
MY_XTICKLABELS

4.625

4.6 | 10 ratings Rate this file 75 Downloads (last 30 days) File Size: 1.89 KB File ID: #19059

MY_XTICKLABELS

by Pekka Kumpulainen

 

05 Mar 2008 (Updated 05 Mar 2008)

Replaces XTickLabels with "normal" texts accepting multiline texts and TEX interpreting

| Watch this File

File Information
Description

MY_XTICKLABELS replaces XTickLabels with "normal" texts accepting multiline texts and TEX interpreting and shrinks the axis to fit the texts in the window.

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.
Comments and Ratings (11)
22 Apr 2008 Bob Farrell

Perfect. Just what I was looking for. It does what it says and was a drop-in into my code. I needed multi-line xtick labels, and the TEX characters were a bonus.

18 Jul 2008 Claude Mueller

worked great for me! thanks!!

20 Jun 2009 Wilbert Zarco

It solves the 'xticklabels' limitation of lacking Tex capabilities, and I think also the work for the matlab team to implementing it. Great job!

24 Nov 2009 Dominik Bach

After switching to 7.8.0.347 (R2009a), the squeeze axes part of the function does not work any more. Converting the axes units to pixels produces negative values for some reason, hence the function crashes. Otherwise still very helpful.

10 Sep 2010 Andrew Schwartz

Works for the most part. Manageable issue: labels remain in same figure positions when changing the axis using axis(xylims) rather than moving to the new correct locations relative to the axes. Solution for now is of course to only call my_xticklabels after axis limits have been set.

01 Sep 2011 Du Xiao

Perfect, Thank you very much for your help!

09 Dec 2011 craq

This is a very useful tool. One suggestion though: the text() command gets confused if there is more than one axis, so maybe you can set the current axis to Ha with axes(Ha) before the cell '%% Make XTickLabels'.

02 Mar 2012 Kristofer Kusano  
02 Mar 2012 Kristofer Kusano

Very nice, thanks for posting this

03 Apr 2012 Mauro Donzelli  
03 Apr 2012 Mauro Donzelli  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
annotation Pekka Kumpulainen 22 Oct 2008 09:52:01
customization Pekka Kumpulainen 22 Oct 2008 09:52:01
xticklabels Pekka Kumpulainen 22 Oct 2008 09:52:01
multiple line Pekka Kumpulainen 22 Oct 2008 09:52:01
graphics Pekka Kumpulainen 22 Oct 2008 09:52:01
tex Pekka Kumpulainen 22 Oct 2008 09:52:01
multiple line Anita Banerji 02 Aug 2010 12:21:00
multiple line Ana 12 Nov 2010 05:50:39
multiple line Gabriel Schuler 22 Feb 2012 07:49:07

Contact us at files@mathworks.com