Figure styles¶
Python¶
Use a Matplotlib style context to change one figure without changing later figures:
import matplotlib.pyplot as plt
import erlab.plotting as eplt
with plt.style.context(["erlab.general", "erlab.nature", "erlab.arial"]):
eplt.plot_array(data, cmap="Greys", gamma=0.5)
See the bundled style-sheet table to select a style or font combination.
Confirm that every requested font is installed. Save and inspect the figure in its final output format because font substitution and line widths can differ from the notebook display.
See the Matplotlib style-sheet guide
for style composition and rcParams.
Figure Composer¶
Figure Composer styles are shared settings. They apply to Figure Composer figures that use those settings. A Python style context applies only to the figure created inside the context.
To apply the same bundled styles:
Open the shared Settings window.
Select Figure Composer.
In Stylesheets, select
erlab.general, then choose Add.Add
erlab.natureanderlab.arialin the same way.Use Up and Down to keep the styles in this order:
erlab.general,erlab.nature,erlab.arial.Open or refresh a figure. Check its fonts, line widths, dimensions, and export settings.
For custom stylesheets, see Installing a custom stylesheet. See Styles and export settings for style and export precedence.