http://pandas.pydata.org/pandas-docs/version/0.19.1/visualization.html

import matplotlib
matplotlib.style.use('ggplot')

I think this should be removed since currently the way to do this is:

import matplotlib.pyplot as plt
plt.style.use('ggplot')

I can fix this.

Comment From: tacaswell

I would prefer

import matplotlib as mpl
mpl.style.use('ggplot')

or to leave it as it is

Where is it documented that the preferred way to do this is via pyplot (and to be clear it is the same code run in all cases, there is just lots of (re) importing between mpl modules going on) so I can fix that?

Comment From: kordek

From the pandas doc:

We use the standard convention for referencing the matplotlib API:

python In [1]: import matplotlib.pyplot as plt

The plots in this document are made using matplotlib’s ggplot style (new in version 1.4):

python import matplotlib matplotlib.style.use('ggplot')

That's just inconsistent for me as a reader. My impression from the aforementioned doc was that the pyplot way was preferred, but I don't have knowledge on that. So some cleanup is needed. I agree fix is not the best word here.

Comment From: TomAugspurger

@kordek , FYI @tacaswell is a matplotlib maintainer, so we should listen to him on this one :)

FYI @tacaswell looks like plt.style.use is in a few places under the examples at http://matplotlib.org/examples/style_sheets/index.html (that's as of 1.5.3 though, maybe changed in 2.0 docs already?)

Comment From: kordek

I have hardly any knowledge of matplotlib workings, so not going to suggest anything, just noticed some inconsistency and proposed my first idea :) I'll leave it for now, if there is some agreement on this I can always help simply with changing the docs.

Comment From: jorisvandenbossche

So I think the agreement is to leave as is then.