MATLAB Answers

Change Plot background color and save to file

62 views (last 30 days)
leonidas86 on 8 Jun 2018
Answered: leonidas86 on 13 Jun 2018
Hello again,
I have multiple plots and I want to have a gray background for them. I have tried:
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.

Accepted Answer

leonidas86 on 13 Jun 2018
It works with:
set(gcf, 'InvertHardCopy', 'off');

More Answers (1)

Sai Deepesh Pokala
Sai Deepesh Pokala on 8 Jun 2018
Try getframe() or export_fig('') after the set gca step.

Community Treasure Hunt

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

Start Hunting!