[ase-users] ASE-GUI Screen colours

Christian Glinsvad chlg at fysik.dtu.dk
Thu Apr 26 18:28:26 CEST 2012


Hi

Jens Jørgen wrote:
> Instead of adding a menu for setting the background colors, how about
> making it a configuration option one can set in ~/.ase/gui.py, which is
> read from ase/gui/defaults.py.

The settings 'gui_foreground_color' and 'gui_background_color' have been
added to ase/gui/defaults.py as of r2600 and can take on any HTML hex
color code e.g. '#000000' for black and '#ffffff' for white. So now you can have:

$ cat ~/.ase/gui.py
gui_default_settings['gui_foreground_color'] = '#ffffff'
gui_default_settings['gui_background_color'] = '#000000'

Anna Kausamo wrote:
> The problem was solved following your excellent instructions. But
> another problem surfaced. The background of all graphs should be dark
> as well. I do not know how to adjust the colours - or even, whether or
> not it is possible. Could someone help?

After a bit of tinkering with GTK settings, I discovered that this is in fact
controlled entirely by Matplotlib default settings, which you can override
by putting something like the following options in ~/.matplotlib/matplotlibrc:

patch.edgecolor  : white
text.color       : white
axes.facecolor   : black
axes.edgecolor   : white
axes.labelcolor  : white
axes.color_cycle : b, g, r, c, m, y, w
xtick.color      : white
ytick.color      : white
grid.color       : white
figure.facecolor : 0.1
figure.edgecolor : black

More info about customizing Matplotlib can be found here:
http://matplotlib.sourceforge.net/users/customizing.html

Regards
Christian Glinsvad



More information about the ase-users mailing list