gbspy.options module
Provides global options for the package
- class gbspy.options.set_options(**kwargs)
Bases:
object
Set options for gbspy, including in contexts.
- Parameters
cmap (str or matplotlib.colors.Colormap, default: "viridis") – Colormap to use on two-dimensional plots. If string, must be recognized as a valid colormap by matplotlib.
num_contours (int, default: 50) – The number of contours to draw on contour plots.
pcolor_shading (str, default: "nearest") – Shading option used for
pcolormesh()
plots.
Examples
Change the default colormap only in a few plots,
>>> sim = gbspy.Sim("/some/path/to/a/simulation") >>> with gbspy.options.set_options(cmap="hot"): ... gbspy.plot2d(sim, "theta")