I have a figure that I want his name to be Step 2 of 3: Simulation Plot Window
, but its name is: figure 2: Step 2 of 3: Simulation Plot Window
.
How can I change his name to the name I want?
I don't know if it's necessary, but in the start of the code I wrote:
hFig = figure('Name','window 1','Visible','Off');
and Towards my code ends, I write:
hFig = figure('Name','Step 2 of 3: Simulation Plot Window','Menubar','none', 'Resize','off', ...
'WindowStyle','modal', 'Position',[300 300 1150 600]);
Showing the number in the title is one of the properties of the figure.
By default it is set to on
, unless you are using GUIDE
.
Anyway, in order to remove it, use
set(gcf,'NumberTitle','off');
A better way would be to use the handle that you got from a call to the figure
function:
hFig = figure('Name','window 1','Visible','Off');
set(hFig,'NumberTitle','off');
Also, (as @GuntherStruyf also mentioned), it is possible to do it in the call to the figure
function itself:
hFig = figure('Name','window 1','Visible','Off','NumberTitle','off');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With