File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 1313 np.set_printoptions(precision = 4 , suppress = True )
1414 import matplotlib.pyplot as plt
1515 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'
1721 options.display.max_rows = 15
1822 from pandas.compat import lrange
1923
@@ -29,14 +33,11 @@ We use the standard convention for referencing the matplotlib API:
2933
3034 .. versionadded :: 0.11.0
3135
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.
3340When 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'
4041
4142We provide the basics in pandas to easily create decent looking plots.
4243See the :ref: `ecosystem <ecosystem.visualization >` section for visualization
You can’t perform that action at this time.
0 commit comments