Skip to content

Commit

Permalink
TST: Add test for visibility of x label and xtick labels for `plot.he…
Browse files Browse the repository at this point in the history
…xbin` (#60253)

TST: Add test for visibility of x label and xtick labels for plot.hexbin

TST: Add test for visibility of x label and xtick labels for plot.hexbin

TST: Add test for visibility of x label and xtick labels for plot.hexbin

TST: Add test for visibility of x label and xtick labels for plot.hexbin

TST: Add test for visibility of x label and xtick labels for plot.hexbin

Minimize size of test data

Co-authored-by: Jason Mok <[email protected]>
  • Loading branch information
jasonmokk and Jason Mok authored Nov 12, 2024
1 parent 6bdb32b commit 2d116df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pandas/tests/plotting/frame/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2589,6 +2589,14 @@ def test_plot_period_index_makes_no_right_shift(self, freq):
result = ax.get_lines()[0].get_xdata()
assert all(str(result[i]) == str(expected[i]) for i in range(4))

def test_plot_display_xlabel_and_xticks(self):
# GH#44050
df = DataFrame(np.random.default_rng(2).random((10, 2)), columns=["a", "b"])
ax = df.plot.hexbin(x="a", y="b")

_check_visible([ax.xaxis.get_label()], visible=True)
_check_visible(ax.get_xticklabels(), visible=True)


def _generate_4_axes_via_gridspec():
gs = mpl.gridspec.GridSpec(2, 2)
Expand Down

0 comments on commit 2d116df

Please sign in to comment.