File tree 1 file changed +9
-8
lines changed
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 13
13
np.set_printoptions(precision = 4 , suppress = True )
14
14
import matplotlib.pyplot as plt
15
15
plt.close(' all' )
16
- options.display.mpl_style = ' default'
16
+ import matplotlib
17
+ try :
18
+ matplotlib.style.use(' ggplot' )
19
+ except AttributeError :
20
+ options.display.mpl_style = ' default'
17
21
options.display.max_rows = 15
18
22
from pandas.compat import lrange
19
23
@@ -29,14 +33,11 @@ We use the standard convention for referencing the matplotlib API:
29
33
30
34
.. versionadded :: 0.11.0
31
35
32
- The ``display.mpl_style `` produces more appealing plots.
36
+ The plots in this document are made using matplotlib's ``ggplot `` style (new in version 1.4).
37
+ If your version of matplotlib is 1.3 or lower, setting the ``display.mpl_style `` to ``'default' ``
38
+ with ``pd.options.display.mpl_style = 'default' ``
39
+ to produce more appealing plots.
33
40
When set, matplotlib's ``rcParams `` are changed (globally!) to nicer-looking settings.
34
- All the plots in the documentation are rendered with this option set to the
35
- 'default' style.
36
-
37
- .. ipython :: python
38
-
39
- pd.options.display.mpl_style = ' default'
40
41
41
42
We provide the basics in pandas to easily create decent looking plots.
42
43
See the :ref: `ecosystem <ecosystem.visualization >` section for visualization
You can’t perform that action at this time.
0 commit comments