X Tutup
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions doc/users/style_sheets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ just add::

To list all available styles, use::

>>> print plt.style.available
>>> print(plt.style.available)


Defining your own style
Expand Down Expand Up @@ -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
>>>
Expand Down
X Tutup