Configuration#

List of xoa options#

Some options are accessible to alter the default behavior of xoa. These options are of a particular type and have a default value, as shown in the following table.

Flat view of available xoa options#

Name

Type

Default value

Description

cf.cache

boolean

False

Use the cf in memory and file caches

plot.cmapdiv

string

cmo.balance

Default diverging colormap

plot.cmappos

string

cmo.amp

Default positive colormap

plot.cmapneg

string

cmo.tempo_r

Default negative colormap

plot.cmapcyc

string

cmo.phase

Default cyclic colormap

Note

The xoa configuration system is based on the configobj package.

Setting options#

Permanent settings#

You can permanently change default settings by editing the xoa user configuration file, which is typically here on linux: ~/.local/share/xoa/xoa.cfg. Use the following command to see where this is located:

$ xoa info paths

This file is organised in sections, which correspond to the string before the dot “.” in the “flat” view of the option names.

Inline settings#

You can change options from python with the xoa.set_option() function and the xoa.set_options class:

xoa.set_option("plot.cmapdiv", "cmo.balance")  # single option
xoa.set_options("plot", cmapdiv="cmo.balance", cmappos="cmo.amp")  # several options

xoa.set_options can be used as a context manager to temporarily change options within a block:

with xoa.set_options("plot", cmapdiv="cmo.balance"):

    # you code with temporary settings

# back to previous options

Getting options#

From commandline#

Default options are printable with the following command:

$ xoa info options

Options are organised in sections.

From python#

You can use the xoa.get_option() function to access a single option:

cmap = xoa.get_option('plot.cmapdiv') # flat mode
cmap = xoa.get_option('plot', 'cmapdiv') # section mode