How to modify title (size or position)?
185 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I'm new to Matlab and am working off a previously set up template. I'm having difficulties with my title. The template is set up so that four different views are saved and the title is floating. When I print the graphs it cuts off half of the title. Is there a way to either shrink the size of the text or to move it down to fix to the problem?
Below is the current code. How would I modify it to fix this problem?
title({'May 10, Run 6 | MN'});
ylabel('Temperature (K)')
xlabel('\lambda (nm)')
zlabel('Counts')
axis([300 550 110 350])
Thank you for your help!
0 comentarios
Respuesta aceptada
Image Analyst
el 10 de Mayo de 2013
Editada: Image Analyst
el 10 de Mayo de 2013
You didn't post a screenshot, so I'm not sure what the problem is, but try this code:
fontSize = 14; % Whatever you want.
caption = sprintf('May 10, Run 6\nMN');
title(caption, 'FontSize', fontSize);
ylabel('Temperature (K)', 'FontSize', fontSize)
xlabel('\lambda (nm)', 'FontSize', fontSize)
zlabel('Counts', 'FontSize', fontSize)
axis([300 550 110 350])
% Enlarge figure to full screen.
set(gcf, 'units','normalized','outerposition',[0 0 1 1]);
When you create the string, such as caption like I did, put in a backslash n wherever you want it to go to the next line.
Más respuestas (1)
Ver también
Categorías
Más información sobre Numeric Types en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!