diff --git a/doc/users/style_sheets.rst b/doc/users/style_sheets.rst index b4e507a8fef..f5d984a4920 100644 --- a/doc/users/style_sheets.rst +++ b/doc/users/style_sheets.rst @@ -19,7 +19,7 @@ just add:: To list all available styles, use:: - >>> print plt.style.available + >>> print(plt.style.available) Defining your own style @@ -73,12 +73,11 @@ to change the global styling, the style package provides a context manager for limiting your changes to a specific scope. To isolate the your styling changes, you can write something like the following:: - >>> import numpy as np >>> import matplotlib.pyplot as plt >>> >>> with plt.style.context(('dark_background')): - >>> plt.plot(np.sin(np.linspace(0, 2*np.pi)), 'r-o') + >>> plt.plot(np.sin(np.linspace(0, 2 * np.pi)), 'r-o') >>> >>> # Some plotting code with the default style >>>