Using UIPanel, how do I make a title with multiple lines?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am using the uipanel function to add a supertitle to my subplots https://www.mathworks.com/help/matlab/creating_plots/combine-multiple-plots.html#d119e2898, however, I can only have the title be one line. Is there a way to span the title across two or more lines?
Here's my code:
f = figure(13);
p = uipanel('Parent',f,'BorderType','none');
p.Title = {[cndname ' - CT to Blue Fluoro']; 'Bead Position Error vs Radial Bead Distance'};
p.TitlePosition = 'centertop';
p.FontSize = 11;
p.FontWeight = 'bold';
Additionally, is there a way to make certain word in the title a different color such as in this example - https://www.mathworks.com/help/matlab/ref/title.html#btpl69n-1_1. Once again, the uipanel function doesn't allow me to do this.
2 comentarios
Walter Roberson
el 18 de Jun. de 2018
My experiments suggest that the title property is not interpreted, so tex and latex and HTML cannot be used, and that only the first line of a cell array will be displayed. So I do not think it is possible except perhaps by going in at the java level
Respuestas (2)
Frederic
el 8 de Jul. de 2021
Example
fig = uifigure('Position',[100 100 200 200],...
'Name','My fig title');
title_line = "line1 ";
title_line = title_line + newline + "line2";
zone4 = uipanel(fig,...
'Title',title_line,'FontSize',12,...
'BackgroundColor','white',...
'Position',[25 25 75 150]);

0 comentarios
Ver también
Categorías
Más información sobre Line Plots 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!