Code covered by the BSD License  

Highlights from
mtit: a pedestrian major title creator

4.625

4.6 | 16 ratings Rate this file 270 Downloads (last 30 days) File Size: 2.36 KB File ID: #3218

mtit: a pedestrian major title creator

by us

 

01 Apr 2003 (Updated 13 Nov 2009)

MTIT creates a major title in a figure with many axes

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

MTIT
- creates a major title above all axes in a figure
- preserves the stack order of the axes

several options allow to fine-tune the position of the title and typical text property/value pairs may be used as additional input to further adjust its looks

see
> help mtit
for usage and a brief example for this small utility

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (19)
07 Jan 2006 Madhusudhanan Balasubramanian  
11 Apr 2006 p kung  
29 Jan 2008 Tom Fitzpatrick

nice one, just what i was looking for

07 Feb 2008 Heesun Kiem

This is one I have been looking. It is very useful. Thanks.

15 Apr 2008 Mark Gregor

Great work, good to have it.

17 Sep 2008 Dave Watts

Nice but to be really good the rest of the plot needs to be moved to create space for the title

09 Nov 2009 sophie neve

I got a problem with it... makes the rotation of 3D surf impossible....

13 Nov 2009 us

this happens by design:
after MTIT terminates, the current (active) axis (GCA) is the handle of the invisible surrounding axis created by MTIT...
i've changed this behavior and an update should show up soon...
in the meantime, you can use this (tedious) approach
% create your figure/axes
     cah=gca; % <- save current axis handle
     mtit(gcf,'foo');
     axes(cah); % <- reset current axis handle

us

26 Nov 2009 Shlomi  
11 Mar 2010 Adam A

Does the job nicely, thanks.

26 May 2010 Pawel S

Very easy to handle. It did exaclty what I wanted. Thx!

26 Aug 2010 David

A simple, handy function - thank you!

However, I had trouble with the 'xoff', 'yoff', etc. options. When specifying just one of these, the title moved horizontally no matter which of these offsets was entered. I exchanged lines 154 and 155 in the code:

    io=io+1;
if any(ix)

and now the offsets work individually or together.

17 Jan 2011 Roland Pasto  
19 Jan 2011 Joshua Kaizer

works very well

15 Feb 2011 Heinri Brink

Ok, but this does not work for a two line title. I want to add a title with two lines as in title({Line1,Line2});

22 Mar 2011 Maikol Solís Chacón  
12 Apr 2011 Yoichi  
23 Nov 2011 Lakshmi Kolluru

its really nice and helped me do what i wanted.

06 Feb 2012 Vahid

works nicely!

Please login to add a comment or rating.
Updates
07 Apr 2003

1) additional buil-in title modifier pairs
2) uses GCF by default
3) restores axes units that are not normalized

12 May 2003

help updated

13 Nov 2009

MTIT now preserves the stack of axis handles and returns in GCA the last used axis; version tag 13-Nov-2009 17:38:17

Tag Activity for this File
Tag Applied By Date/Time
annotation us 22 Oct 2008 06:59:20
customization us 22 Oct 2008 06:59:20
title us 22 Oct 2008 06:59:20
figure us 22 Oct 2008 06:59:20
graphics us 22 Oct 2008 06:59:20
plot us 22 Oct 2008 06:59:20
subplot us 22 Oct 2008 06:59:20
axis us 22 Oct 2008 06:59:20
title KSV 07 Jan 2010 00:37:31
potw Shari Freedman 06 Aug 2010 10:04:32
annotation Jose Ercolino 09 Aug 2010 20:27:55
figure Jose Ercolino 09 Aug 2010 20:28:08
graphics Jose Ercolino 09 Aug 2010 20:28:12
plot Jose Ercolino 09 Aug 2010 20:28:14
subplot Jose Ercolino 09 Aug 2010 20:28:17
title Jose Ercolino 09 Aug 2010 20:28:18
pick of the week Jiro Doke 11 Feb 2011 20:09:51
axis Jason 06 May 2011 22:28:17
annotation Nilimb 16 Jan 2012 09:42:16

Contact us at files@mathworks.com