is it possible to define global title on figures?

Illustration
prashantgujjar370 - 2020-02-12T13:43:29+00:00
Question: is it possible to define global title on figures?

I have subplots with titles, but I want to add a title to the whole figure. Is it possible?

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

Yes this is possible by creating a new axes which takes up much of the figure. Then a title for this axes. Turning the axes Visible property 'off' will make the axes "disappear", but the title will inherit this property and you will need to turn the Visible property for the title back 'on'.

x = 0:0.001:2*pi;
y1 = cos(x);
y2 = sin(x);
f = figure;
subplot(2,1,1)
plot(x,y1)
subplot(2,1,2)
plot(x,y2)
a = axes;
t1 = title('Global Title');
a.Visible = 'off'; % set(a,'Visible','off');


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!