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

15 Ansichten (letzte 30 Tage)
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?

Antworten (1)

Srivardhan Gadila
Srivardhan Gadila am 10 Apr. 2020
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.

Kategorien

Mehr zu Printing and Saving finden Sie in Help Center und File Exchange

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by