How do I turn off white figure background when exporting? (Permanently)

2 ビュー (過去 30 日間)
Batuhan Baserdem
Batuhan Baserdem 2020 年 4 月 6 日
回答済み: Srivardhan Gadila 2020 年 4 月 10 日
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
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.

カテゴリ

Help Center および File ExchangePrinting and Saving についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by