Restore default figure parameter before running a Script

조회 수: 75 (최근 30일)
Alejandro Fernández
Alejandro Fernández 2020년 11월 1일
댓글: Souarv De 2022년 7월 5일
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
Walter Roberson
Walter Roberson 2020년 11월 1일
(to summarize, the code sets a whole bunch of root "default" properties.)
Alejandro Fernández
Alejandro Fernández 2020년 11월 1일
Yes, and the question is how could I restore the previous defaults

댓글을 달려면 로그인하십시오.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 1일
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
Gilbert huang
Gilbert huang 2022년 5월 30일
Thank you very much!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Specifying Target for Graphics Output에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by