The Background Color Is Not Saved!
28 ビュー (過去 30 日間)
I want to save this image with a gray background, but when I open the .jpg file, it appears with a white background.
h = gcf;
ax = gca;
ax.Color = [0.5 0.5 0.5];
What is the solution to save the background color to the image file as well?
その他の回答 (1 件)
Navid Ghajarnia 2022 年 3 月 31 日
The answer to this questionis given here:
Please execute the following command before you save the figure in the PNG format.
set(gcf, 'InvertHardcopy', 'off');
Then, you can save the plot as it is displayed.