View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.8 | 5 ratings Rate this file 37 Downloads (last 30 days) File Size: 1.95 KB File ID: #42114 Version: 1.4
image thumbnail



Chad Greene (view profile)


06 Jun 2013 (Updated )

Place a title inside a plot. Reduces title/xlabel ambiguity in figures with multiple subplots.

| Watch this File

File Information

ntitle(titlestring,varargin) places a title within the plot instead of on top. In the spirit of Edward Tufte, this is intended to keep the title close to the data it describes and minimize wasted space. The ntitle function may prove particularly useful for figures with several subplots, where titles can sometimes become confused with xlabels above them.

By default, ntitle centers the title at the top of the plot, but any of the location coordinates (e.g., north, southwest, etc.) can be used with the argument 'location'. Output h provides the handle for the ntitle.

% First make a plot:
x = -50:.1:50;
y = 10*sin(x)+.1*x.^2;
axis([-50 50 -50 300])
box off

% Here are 9 obnoxious examples of how to use ntitle:
ntitle('Title 1');
ntitle('{\it Title 2}','location','northwest');
ntitle('Title 3 ','location','northeast','fontsize',10,'edgecolor','b');
ntitle(' Title 4 ','location','east','color','r');
ntitle('Title 5','location','center','color','m','backgroundcolor','y');
ntitle(' Title 6','location','west','color',[.2 .5 .8]);
ntitle(' Title 7','location','southwest','fontname','Courier');
ntitle('Title 8','location','south','fontweight','bold','fontname','Times');
h9 = ntitle('Title 9 ','location','southeast','fontsize',30);

Consider pairing ntitle with figtitle (


This file inspired Daily Antarctic Sea Ice Concentration, Figtitle, and Label.

Required Products MATLAB
MATLAB release MATLAB 8.0 (R2012b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
16 Oct 2016 Mohit Kumar

very useful. Thanks

17 Aug 2016 Delint Ira Setyo Adi

awesomeee !!!

thanks alot

08 Jun 2016 Yumeng

Yumeng (view profile)

Great tool for subplots!

02 Jun 2016 Yuhui Tong

Great job, nice and neat! Thank you very much!

18 Aug 2014 Ismail M. El-Badawy

Thanks for this work

18 Jul 2013 1.1

A title handle is now returned only if the user requests it.

05 Aug 2013 1.3

Changed default font size.

19 Aug 2013 1.4

example image was lost in the last update.

Contact us