Skip to content

Matplotlib Style

TopoStats includes its own Matplotlib style file . This resides at topostats/topostats.mplstyle (see also GitHub repository).

If you wish to customise the style of plots you can create a copy of this using topostats create-matplotlibrc. For more information see

topostats create-matplotlibrc --help

Once you have modified and saved the file you can run your analyses with it using...

topostats --matplotlibrc <filename>

Alternatively you can change the parameters in a custom configuration file to point to the newly created style file.

Color Maps

Several custom colormaps for plotting data are also included. These are defined within the topostats.themes.Colormap class. For full details refer to the API.

  • nanoscope colormap is provided and used by default.
  • gwyddion colormap is provided that matches the colormap used by default in the Gwyddion
  • blue colormap is used for masks by default.
  • blue_purple_green colormap is available and is used when plotting traces of overlapping molecules.