How do I turn off white figure background when exporting? (Permanently)
2 次查看(过去 30 天)
显示 更早的评论
I'm trying to save images from the commandline. Because i generally use darkmode; I have this is my startup.m;
% Default axis coloring
colordef('black');
So my figures are plotted with black background; which is what I like. I also want to export the figures with the black background. From the figure window; i go to File -> Export Setup -> Rendering and untick the Custom Color box to export with my background. However; I can't do in individually for every figure. Is there a way I can set this option as the default?
回答(1 个)
Srivardhan Gadila
2020-4-10
A list of factory-defined graphics settings that can be manipulated can be obtained by executing this command at the MATLAB prompt:
get(0,'Factory')
To set the default color for all graphics objects, the 'defaultfigurecolor' property of the ROOT graphics object needs to be defined as follows:
set(0,'defaultfigurecolor',[1 1 1])
Once the property is set, all succesive figures created will inherit this property from the ROOT graphics object.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Printing and Saving 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!