From d9f68ee916d86e73fc595ced6d08868d4ae315d7 Mon Sep 17 00:00:00 2001 From: story645 Date: Mon, 21 Mar 2016 00:03:33 -0400 Subject: [PATCH] Documentation bug #6180 Implemented @anntzer's suggestions in #6180 --- doc/users/style_sheets.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 >>>