Change Plot background color and save to file

조회 수: 31 (최근 30일)
leonidas86
leonidas86 2018년 6월 8일
댓글: Tomas 2025년 3월 25일
Hello again,
I have multiple plots and I want to have a gray background for them. I have tried:
set(gca,'color','gray')
print(f(1),num2str(SavePath),'-dmeta');
This works in the figure window but when I save the figure with print the saved plot has a white background.
As always any help is greatly appreciated.

채택된 답변

leonidas86
leonidas86 2018년 6월 13일
It works with:
set(gcf, 'InvertHardCopy', 'off');

추가 답변 (1개)

Sai Deepesh Pokala
Sai Deepesh Pokala 2018년 6월 8일
Try getframe() or export_fig('') after the set gca step.

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by