Subplot Titles Don't Appear
59 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tyler
el 9 de Mayo de 2016
Comentada: Tyler
el 9 de Mayo de 2016
Hi, I just have a simple question about subplot titles. I have the following code-
figure
subplot(1,2,1)
[hax1,hline1] = plot....
title('Mean Value')
subplot(1,2,2)
[hax2,hline2] = plot....
title('95% Prediction Interval Range')
When I do this the titles don't show up. Do any of you recognize something I'm overlooking with this?
Thanks!
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 9 de Mayo de 2016
t=0:0.1:10;
y=sin(t)
figure
subplot(1,2,1)
hax1 = plot(t,y)
title('Mean Value')
subplot(1,2,2)
hax2= plot(t,2*y)
title('95% Prediction Interval Range')
0 comentarios
Más respuestas (1)
Walter Roberson
el 9 de Mayo de 2016
The outputs you show for plot() tell me that you are not using plot(), that instead you are using plotyy() -- plot() does not return the axes but plotyy() does.
My testing in R2016a suggests that after plotyy() calls, the current axes is not changed -- though I did not test the case where you pass an axes in to plotyy() as the first argument.
Anyhow, your code must not be what you show, and what your code actually has might be important for resolving the situation.
The safest thing to do is pass the appropriate axes to title() as the first argument.
title(hax1[1], 'Mean value')
Ver también
Categorías
Más información sobre Two y-axis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!