@@ -13,12 +13,12 @@ example, there's a pre-defined style called "ggplot", which emulates the
1313aesthetics of ggplot _ (a popular plotting package for R _). To use this style,
1414just add::
1515
16- >>> from matplotlib import style
17- >>> style.use('ggplot')
16+ >>> import matplotlib.pyplot as plt
17+ >>> plt. style.use('ggplot')
1818
1919To list all available styles, use::
2020
21- >>> print style.available
21+ >>> print plt. style.available
2222
2323
2424Defining your own style
@@ -45,8 +45,8 @@ For example, you might want to create
4545Then, when you want to adapt a plot designed for a paper to one that looks
4646good in a presentation, you can just add::
4747
48- >>> from matplotlib import style
49- >>> style.use('presentation')
48+ >>> import matplotlib.pyplot as plt
49+ >>> plt. style.use('presentation')
5050
5151
5252Composing styles
@@ -57,8 +57,8 @@ sheet that customizes colors and a separate style sheet that alters element
5757sizes for presentations. These styles can easily be combined by passing
5858a list of styles::
5959
60- >>> from matplotlib import style
61- >>> style.use(['dark_background', 'presentation'])
60+ >>> import matplotlib.pyplot as plt
61+ >>> plt. style.use(['dark_background', 'presentation'])
6262
6363Note that styles further to the right will overwrite values that are already
6464defined by styles on the right.
@@ -75,9 +75,8 @@ changes, you can write something like the following::
7575
7676 >>> import numpy as np
7777 >>> import matplotlib.pyplot as plt
78- >>> from matplotlib import style
7978 >>>
80- >>> with style.context(('dark_background')):
79+ >>> with plt. style.context(('dark_background')):
8180 >>> plt.plot(np.sin(np.linspace(0, 2*np.pi)), 'r-o')
8281 >>>
8382 >>> # Some plotting code with the default style
0 commit comments