Skip to content

Commit 747d5da

Browse files
Jason MokJason Mok
Jason Mok
authored and
Jason Mok
committed
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
1 parent 754d091 commit 747d5da

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/plotting/frame/test_frame.py

+7
Original file line numberDiff line numberDiff line change
@@ -2589,6 +2589,13 @@ def test_plot_period_index_makes_no_right_shift(self, freq):
25892589
result = ax.get_lines()[0].get_xdata()
25902590
assert all(str(result[i]) == str(expected[i]) for i in range(4))
25912591

2592+
def test_plot_display_xlabel_and_xticks(self):
2593+
# GH#44050
2594+
df = DataFrame(np.random.default_rng(2).random((1000, 2)), columns=["a", "b"])
2595+
ax = df.plot.hexbin(x="a", y="b")
2596+
2597+
_check_visible([ax.xaxis.get_label()], visible=True)
2598+
_check_visible(ax.get_xticklabels(), visible=True)
25922599

25932600
def _generate_4_axes_via_gridspec():
25942601
gs = mpl.gridspec.GridSpec(2, 2)

0 commit comments

Comments
 (0)