Restore default figure parameter before running a Script

87 views (last 30 days)
Hi everyone, I was wondering if anyone knew that after running the file found in here (I also attach the file) you can reset the default parameters of the figures that come in matlab.
For example I want to have the figure 1 with the parameteres in the script and the figure 2 and the next ones with the default parameters in matlab (in this order). Thank you so much.
figure_configuration_IEEE_standard
figure(1)
plot(2:10)
% Restore parameters of all next figures
figure(2)
plot(5:10)
  2 Comments
Walter Roberson
Walter Roberson on 1 Nov 2020
(to summarize, the code sets a whole bunch of root "default" properties.)
Alejandro Fernández
Alejandro Fernández on 1 Nov 2020
Yes, and the question is how could I restore the previous defaults

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 1 Nov 2020
Try resetting the graphics root
reset(groot); % or reset(0)
Try this
figure_configuration_IEEE_standard
figure(1)
plot(2:10)
% Restore parameters of all next figures
reset(groot)
figure(2)
plot(5:10)
  4 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Specifying Target for Graphics Output in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!