agepy.ageplot.context
- context(styles)
Context manager for using the AGE style in a with statement.
- Parameters:
- styles: str or list of string
Styles to be loaded using
plt.style.context(). Available styles can be viewed by callingageplot.age_stylesandageplot.mpl_styles.
Warning
Compatibility between styles is not guaranteed.
Notes
All style rcParams are reset to the matplotlib default before loading the specified styles.
Examples
How to use the AGE style in a with statement:
>>> import matplotlib.pyplot as plt >>> from agepy import ageplot >>> with ageplot.context(["age", "prl"]): ... plt.plot([1, 2, 3], [4, 5, 6])