Skip to content

Commit a894b64

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 TST: Add test for visibility of x label and xtick labels for plot.hexbin Minimize size of test data
1 parent 754d091 commit a894b64

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/plotting/frame/test_frame.py

+8
Original file line numberDiff line numberDiff line change
@@ -2589,6 +2589,14 @@ 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((10, 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)
2599+
25922600

25932601
def _generate_4_axes_via_gridspec():
25942602
gs = mpl.gridspec.GridSpec(2, 2)

0 commit comments

Comments
 (0)