Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1.13 KB

configuration.rst

File metadata and controls

30 lines (19 loc) · 1.13 KB

igraph

Configuration

includes customization options that can be set via the configuration.Configuration object and can be preserved via a configuration file. This file is stored at ~/.igraphrc by default on Linux and Mac OS X systems, and at C:\Documents and Settings\username\.igraphrc on Windows systems.

To modify config options and store the result to file for future reuse:

import igraph as ig

# Set configuration variables
ig.config["plotting.backend"] = "matplotlib"
ig.config["plotting.palette"] = "rainbow"

# Save configuration to default file location
ig.config.save()

Once your configuration file exists, will load its contents automatically upon import.

It is possible to keep multiple configuration files in nonstandard locations by passing an argument to config.save, e.g. ig.config.save("/path/to/config/file"). To load a specific config the next time you import igraph, use:

import igraph as ig
ig.config.load("/path/to/config/file")