-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Add test for visibility of x label and xtick labels for plot.hexbin
#60253
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
Conversation
747d5da
to
691f59e
Compare
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.
lgtm
@@ -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((1000, 2)), columns=["a", "b"]) |
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.
df = DataFrame(np.random.default_rng(2).random((1000, 2)), columns=["a", "b"]) | |
df = DataFrame(np.random.default_rng(2).random((10, 2)), columns=["a", "b"]) |
If the test is not dependent on the size of the data, best to keep it minimal
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.
Ah makes sense, I've updated it.
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
691f59e
to
a894b64
Compare
Thanks @jasonmokk |
This PR adds a unit test to
pandas/tests/plotting/frame/test_frame.py
to verify that hexbin plots correctly display x labels and xtick labels. Adds a test for the solved issue described in GH #44050.