Skip to content

Commit ecb91d4

Browse files
committed
Merge pull request #6094 from dsm054/reorder-hist_frame-import
BUG: ensure plt is imported before it's used in hist_frame
2 parents cbf715e + 46e36cc commit ecb91d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tools/plotting.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1994,7 +1994,7 @@ def hist_frame(data, column=None, by=None, grid=True, xlabelsize=None,
19941994
xrot=None, ylabelsize=None, yrot=None, ax=None, sharex=False,
19951995
sharey=False, figsize=None, layout=None, **kwds):
19961996
"""
1997-
Draw Histogram the DataFrame's series using matplotlib / pylab.
1997+
Draw histogram of the DataFrame's series using matplotlib / pylab.
19981998
19991999
Parameters
20002000
----------
@@ -2022,6 +2022,8 @@ def hist_frame(data, column=None, by=None, grid=True, xlabelsize=None,
20222022
kwds : other plotting keyword arguments
20232023
To be passed to hist function
20242024
"""
2025+
import matplotlib.pyplot as plt
2026+
20252027
if column is not None:
20262028
if not isinstance(column, (list, np.ndarray)):
20272029
column = [column]
@@ -2044,7 +2046,6 @@ def hist_frame(data, column=None, by=None, grid=True, xlabelsize=None,
20442046

20452047
return axes
20462048

2047-
import matplotlib.pyplot as plt
20482049
n = len(data.columns)
20492050

20502051
if layout is not None:

0 commit comments

Comments
 (0)