A single title on top of a subplot

版本 1.1.0.0 (1006 字节) 作者: Shoaibur Rahman
Use this function to print a title on the top of a group of subplots
3.1K 次下载
更新时间 2016/1/28

查看许可证

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

引用格式

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. 检索时间: .

MATLAB 版本兼容性
创建方式 R2014b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Title 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Description
Name changes to supertitle
Change title

1.0.0.0