How to make a two line complex plot title
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have a script that performs certain calculations and plot results into graphs. I want to make the title of the graph into 2 lines. Here is the code for setting the title. Could you please tell me how to make it into new line?
title (['Outputs' here I want a new line get(handles.editSampleID,'String' ... '^{T' num2str(a) '}_{' sprintf('%0.2g', str2num(get(handles.editL,'String'))*1e6) '\mum' ])
I include a sample name into the title, plus the value of a parameter called L... I just want to separate these values from the title "Outputs".
Thanks in advance!
G.
0 Kommentare
Antworten (1)
Voss
am 2 Jan. 2024
Bearbeitet: Voss
am 2 Jan. 2024
% using these since I don't want to make uicontrols:
handles_editSampleID_String = '45';
handles_editL_String = '0.00002';
% some value for a as well:
a = 9;
One way:
title (['Outputs' newline() handles_editSampleID_String ...
'^{T' num2str(a) '}_{' sprintf('%0.2g', str2num(handles_editL_String)*1e6) '}\mum' ])
Another way:
title ({'Outputs', [handles_editSampleID_String ...
'^{T' num2str(a) '}_{' sprintf('%0.2g', str2num(handles_editL_String)*1e6) '}\mum' ]})
0 Kommentare
Siehe auch
Kategorien
Mehr zu Title finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
