-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: DataFrame.hist() does not get along with matplotlib.pyplot.tight_layout() #15515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,6 +238,16 @@ def test_hist_layout(self): | |
with tm.assertRaises(ValueError): | ||
df.hist(layout=(-1, -1)) | ||
|
||
@slow | ||
# GH 9351 | ||
def test_tight_layout(self): | ||
if self.mpl_ge_2_0_0: | ||
df = DataFrame(randn(100, 2)) | ||
_check_plot_works(df.hist) | ||
self.plt.tight_layout() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you need a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes that's fine. I realize this just raises |
||
|
||
tm.close() | ||
|
||
|
||
@tm.mplskip | ||
class TestDataFrameGroupByPlots(TestPlotBase): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need the try/except (if it works it won't raise)
add a 1-line comment & the issue number as a comment