-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix Scatter plot datetime and Axis #12949
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
def __init__(self, data, x, y, **kwargs): | ||
MPLPlot.__init__(self, data, **kwargs) | ||
def __init__(self, data, x, y, sharex=False, **kwargs): | ||
if sharex is None: |
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.
To apply the same fix to hexbin, pls move the logic to PlanePlot
. And I think sharex
should be always False
because we don't support scatter subplots ATM?
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.
@sinhrks This is in PlanePlot
can you rebase / update |
Codecov Report
@@ Coverage Diff @@
## master #12949 +/- ##
==========================================
- Coverage 91% 91% -0.01%
==========================================
Files 145 145
Lines 49576 49605 +29
==========================================
+ Hits 45119 45142 +23
- Misses 4457 4463 +6
Continue to review full report at Codecov.
|
@TomAugspurger @sinhrks What's the status of this? |
@nparley can u update to fix above points and add tests? |
Yes sorry I have a go at bringing this up to date |
@sinhrks I have moved the login into the |
This is actually passing I think there was a bit of a travis problem with the latest run (https://travis-ci.org/nparley/pandas/builds/152366202) |
can you rebase / update? |
@jreback this seems to be failing the lint but not in a file related to this PR https://travis-ci.org/nparley/pandas/jobs/158939635 that I can see? Maybe #14198 will fix the lint error. |
flake is too strict here - maybe the version changed or something it's not comparing case |
Line 685 and 690 are both key '2000q4' it's line 681 which is the different case '2000Q4'. |
@nparley hmm, you are right. but it doesn't fail flaking. can you get it to fail on travis (and then fix)? |
prob need to specify that option in setup.cfg to make it active |
Taking out the duplicate line as I did in that #14198 seems to pass locally and on travis. I installed a clean flake8 about 2 hours a go. This was linting locally on my PC while doing the #14198.
to
|
its doesn't fail on travis, so not sure what the difference is. |
It did not pass on travis for me. This is the current master run on my own travis 2 hours a go: https://travis-ci.org/nparley/pandas/builds/158958462 and this is with that duplicate line removed https://travis-ci.org/nparley/pandas/builds/158959215 |
https://travis-ci.org/pydata/pandas/builds/158970327 here is master, just passed. make sure you are rebased. |
Rebased hopefully |
status of this? |
I think it's awaiting feedback to see if anything else needs to be added. I updated the PR after the first comments. I.e. I don't think it's waiting for anything my end. |
@nparley can you add tests for each of the issues that this would close? |
@nparley can you update and respond to comments? |
@nparley can you rebase / update |
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.
@nparley Can you also add some tests for this?
pandas/core/internals.py
Outdated
@@ -3289,6 +3289,16 @@ def get_numeric_data(self, copy=False): | |||
self._consolidate_inplace() | |||
return self.combine([b for b in self.blocks if b.is_numeric], copy) | |||
|
|||
def get_dt_data(self, copy=False): |
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.
I would call this get_datetime_data
pandas/tools/plotting.py
Outdated
@@ -1574,6 +1577,31 @@ def _post_plot_logic(self, ax, data): | |||
ax.set_ylabel(pprint_thing(y)) | |||
ax.set_xlabel(pprint_thing(x)) | |||
|
|||
def _compute_plot_data_with_dt(self): |
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.
If this is only called in _compute_plot_data
in ScatterPlot, why not just putting the code in that function?
def __init__(self, data, x, y, sharex=False, **kwargs): | ||
if sharex is None: | ||
# Fix x axis color bar problems | ||
sharex = False |
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.
This sharex fix, is this independent from the datetime fix?
If so, can you make a separate PR for it?
Hi Guys, I think this PR is probably quite stale now. My development work is not touching pandas that much unfortunately and I don't really have that much time currently. Maybe some of the ideas can be moved into a more active PR if they are still applicable? I have tired to rebase and address the comments above to clean things up but have not tested the latest commit. |
would need a rebase |
closing as stale. if you want to re-visit, pls comment and we can re-open. |
closes #10611
closes #8113
closes #10678
git diff upstream/master | flake8 --diff
This is a first go at trying to fix the above problems. I have created two before and after notebooks here: https://gist.github.com/nparley/08c81672b0e3d7d85b00694a671f57ad