A single title on top of a subplot

Version 1.1.0.0 (1006 Bytes) von Shoaibur Rahman
Use this function to print a title on the top of a group of subplots
3,1K Downloads
Aktualisiert 28 Jan 2016

Lizenz anzeigen

When using subtitle('MY TITLE','PorpertyName','PropertyValue'...), or subtitle('MY TITLE') after a group of subplots, then it provides a title MY TITLE with any property used that is defined in the original title function in Matlab, but without affecting the titles, xlables and ylabels of any of the subplots.
Make sure to use the function after the group of subplots.
Example
x = 0:0.01:6;
subplot(221), plot(x,sin(x)), xlabel('x'), ylabel('sin(x)'), title('sin(x)')
subplot(222), plot(x,cos(x)), xlabel('x'), ylabel('cos(x)'), title('cos(x)')
subplot(223), plot(x,sin(2*x)), xlabel('x'), ylabel('sin(2x)'), title('sin(2x)')
subplot(224), plot(x,cos(2*x)), xlabel('x'), ylabel('cos(2x)'), title('cos(2x)')
subtitle('Single title on top','FontSize',12,'Color','r')
See also:
title, suplabel, subplot

Zitieren als

Shoaibur Rahman (2024). A single title on top of a subplot (https://www.mathworks.com/matlabcentral/fileexchange/48742-a-single-title-on-top-of-a-subplot), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2014b
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Title finden Sie in Help Center und MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Veröffentlicht Versionshinweise
1.1.0.0

Description
Name changes to supertitle
Change title

1.0.0.0