Skip to content

Raising ValueError when xlim and ylim contain non-int and non-float dtype elements #40889 #43932

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

Closed
wants to merge 17 commits into from

Conversation

regmibijay
Copy link

@regmibijay
Copy link
Author

@github-actions pre-commit

@jreback jreback added Bug Error Reporting Incorrect or improved errors from pandas Visualization plotting labels Oct 10, 2021
@jreback jreback added this to the 1.4 milestone Oct 10, 2021
# GH40781
if (
all([is_datetime64_any_dtype(lim) for lim in list_iterable])
or np.issubdtype(np.array(list_iterable).dtype, np.int)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use is_integer, is_float (the pandas routines)

if not self._has_valid_lim_dtype(self.ylim):
raise ValueError(
"`ylim` contains values"
" which are not of float, int or numpy.datetime64 dtype"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we saying np.datetime64, we use the pandas types (and they are converted), so this is extra confusing.

from pandas import DataFrame

pytestmark = pytest.mark.slow

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of making a new file, find an appropriate one which has simliar tests.

@github-actions
Copy link
Contributor

This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Nov 10, 2021
@jreback
Copy link
Contributor

jreback commented Nov 14, 2021

pls merge master and update to comments

@jreback
Copy link
Contributor

jreback commented Nov 28, 2021

can you merge master i think there are some comments as well

@regmibijay
Copy link
Author

can you merge master i think there are some comments as well

Sorry for not updating this pr for a while, while I have worked on other issues, I have been strugglig with a proper place to move my tests to. I just cant wrap my head around where the perfect spot would be. I would be very thankful for some tips. Other changes will be merged accordingly.

@jreback
Copy link
Contributor

jreback commented Dec 24, 2021

needs to be passing and pls merge master

@jreback jreback removed this from the 1.4 milestone Dec 24, 2021
@jbrockmendel
Copy link
Member

a proper place to move my tests to

grepping for .plot.line i see several in tests.plotting.frame.test_frame, that would be a good place to start

@mroeschke
Copy link
Member

Thanks for the PR but appears to have gone stale. If interested in continuing, please merge the main branch and address the review and we can reopen.

@mroeschke mroeschke closed this Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error Reporting Incorrect or improved errors from pandas Stale Visualization plotting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: xlim and ylim not restricting plot area
4 participants