-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
scatter plot and hexbin plot lose x-axis when colorbar is included. #20446
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
Merged
Merged
Changes from 77 commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
e2abff6
removed colorbars from _handle_shared_axes when called by scatterplot…
javadnoorb 0ea226f
removed colorbars from _handle_shared_axes when called by scatterplot…
javadnoorb 80f949f
added a debug global variable
javadnoorb 8f52eab
removed whitespaces
javadnoorb 215fb89
Update _core.py
javadnoorb 7c6efe2
Update _core.py
javadnoorb 8c71f60
Update _tools.py
javadnoorb 63b9ee6
included tests for scatterplot and hexbin plot to ensure colorbar doe…
javadnoorb f401672
Update test_frame.py
javadnoorb b821474
Update test_frame.py
javadnoorb 52c1fa8
Update _tools.py
javadnoorb edf008d
fixing assert message
javadnoorb db6cf67
Update test_frame.py
javadnoorb 186a09c
fixing style issues
javadnoorb e6980f3
DOC: Improve the docstrings of CategoricalIndex.map (#20286)
l736x cdc0240
DOC: update the DataFrame.to_hdf() docstirng (#20186)
shelvinskyi 4848dea
DOC: enable docstring on DataFrame.columns/index (#20385)
jorisvandenbossche 5aed4b5
DOC: general docstring formatting fixes (#20449)
jorisvandenbossche e2053c9
parameterize tests in scalar/timedelta (#20428)
minggli 268fcf6
API & BUG: allow list-like y argument to df.plot & fix integer arg to…
masongallo 3a76199
Removed dead groupby code (#20457)
WillAyd 189dd8e
EHN: allow zip compression in `to_pickle`, `to_json`, `to_csv` (#20394)
minggli c302b04
ENH: Sorting of ExtensionArrays (#19957)
TomAugspurger faefc89
DOC: Improve the docstring of DataFrame.transpose() (#20254)
igorcadelima 4a77c96
DOC: Update pandas.Series.copy docstring (#20261)
thismakessand e03b4b8
DOC: update the pandas.DataFrame.plot.box docstring (#20373)
4kxz 5ffb078
DOC: make deprecation warning more visible with red box (#20357)
Imanflow 689b3fe
TST: clean deprecation warnings & some parametrizing (#20467)
jreback 7f97c13
REF: Mock all S3 Tests (#20409)
TomAugspurger 9dd5111
TST: Fixed version comparison (#20469)
TomAugspurger 10db32e
TST: 32-bit compat for categorical factorization tests (#20482)
jreback c1cbd96
API: Preserve int columns in to_dict('index') (#20444)
reidy-p cfad93f
DOC: Fix broken dependency links (#20471)
tv3141 f3eaa55
DOC: update the pandas.Series.str.startswith docstring (#20458)
dcreekp daa3b33
BUG: dropna() on single column timezone-aware values (#13407) (#20422)
JQGoh 40a91c5
TST: test_nanops some parametrize & catch warnings (RuntimeWarning: A…
jreback eecb129
ENH: DataFrame.pivot accepts a list of values (#18636)
ibrahimsharaf 31f7dc2
BUG: raise error when setting cached properties (#20487)
jorisvandenbossche 56ca9a3
DOC: update the DataFrame.stack docstring (#20430)
samuelsinayoko 492130b
CI: Fixed deprecationWarning (#20489)
TomAugspurger f02b82b
DOC: update the isna, isnull, notna and notnull docstring (#20459)
Cheukting 9778c85
CLN: remove deprecated infer_dst keyword (#20490)
jorisvandenbossche a346778
Parametrized NA sentinel for factorize (#20473)
TomAugspurger b4365e8
DEPR: deprecate get_ftype_counts (GH18243) (#20404)
GGordonGordon 15b7138
DOC: update the Series.str.join docstring (#20463)
fdroessler b0143e5
ENH/API: ExtensionArray.factorize (#20361)
TomAugspurger e6c2945
DOC: update vendored numpydoc version
jorisvandenbossche d2e23f8
DOC: change to numpydoc: add option to use member listing for attributes
jorisvandenbossche 91e5e6b
DOC: change to numpydoc: use isdatadescriptor instead of isgetsetdesc…
jorisvandenbossche 4c6688d
DOC: use numpydoc_use_blockquotes=False for compatibility
jorisvandenbossche 3e91555
DOC: docstring to series.unique (#20474)
minggli 71dff0d
DOC: add guide on shared docstrings (#20016)
TomAugspurger 72524e8
Set pd.options.display.max_columns=0 by default (#17023)
cbrnr fd08b9f
DOC: whatsnew edits
jreback 3549eca
ENH: Support ExtensionArray in Groupby (#20502)
TomAugspurger 223ae0a
DOC: update the pandas.Series.str.endswith docstring (#20491)
dcreekp f067b47
DOC: Improving the docstring of Series.str.upper and related (#20462)
Hamishpk aa1dbd2
DOC: update the Series.between docstring (#20443)
mrw34 86f17cb
CLN: Removed not necessary bn switch decorator on nansum (#20481)
3d47aec
DOC: Fix various warnings (#20509)
TomAugspurger 0c3c723
DOC: whatsnew edits
jreback 145d75c
DOC: Add comparison with Stata page to documentation (#19945)
kylebarron 64a2a55
DOC: Update missing_data.rst (#20424)
pulkitmaloo 41cdfdc
Update v0.23.0.txt
javadnoorb c8ff378
Merge branch 'master' into master
javadnoorb 48291ef
Update test_frame.py
javadnoorb 09c7636
remove whitespace
javadnoorb 864420b
Inline backend (#2)
javadnoorb eb123be
Update _tools.py
javadnoorb 1fb4eec
Update _core.py
javadnoorb 0397999
Update _core.py
javadnoorb 5ba105f
Update v0.23.0.txt
javadnoorb ad1b495
Update _core.py
javadnoorb bdc7f5a
Inline backend - fixing colorbar axis position roundoff error locally
javadnoorb e656f6e
broken merge
javadnoorb 1e4efd3
Merge remote-tracking branch 'upstream/master'
javadnoorb 45aea6f
Merge remote-tracking branch 'upstream/master'
javadnoorb eeb6a9f
update fork
javadnoorb a802ecf
refactoring
javadnoorb 8d766ae
refactoring
javadnoorb 4f380b2
updating whatsnew docs
javadnoorb 04ff768
updating whatsnew docs
javadnoorb 8c0f2e5
updating whatsnew docs
javadnoorb 564790f
updating whatsnew docs
javadnoorb 7196d6e
added more comments
javadnoorb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -882,8 +882,13 @@ def _make_plot(self): | |
kws = dict(ax=ax) | ||
if self.mpl_ge_1_3_1(): | ||
kws['label'] = c if c_is_column else '' | ||
self.fig.colorbar(img, **kws) | ||
|
||
cbar = self.fig.colorbar(img, **kws) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe refactor this and https://github.com/pandas-dev/pandas/pull/20446/files#diff-2b118bda866f3d626ceb6b529c62cd1aR932 to a method. They're identical, right? I guess aside from |
||
points = ax.get_position().get_points() | ||
cbar_points = cbar.ax.get_position().get_points() | ||
cbar.ax.set_position([cbar_points[0, 0], | ||
points[0, 1], | ||
cbar_points[1, 0] - cbar_points[0, 0], | ||
points[1, 1] - points[0, 1]]) | ||
if label is not None: | ||
self._add_legend_handle(scatter, label) | ||
else: | ||
|
@@ -924,7 +929,13 @@ def _make_plot(self): | |
**self.kwds) | ||
if cb: | ||
img = ax.collections[0] | ||
self.fig.colorbar(img, ax=ax) | ||
cbar = self.fig.colorbar(img, ax=ax) | ||
points = ax.get_position().get_points() | ||
cbar_points = cbar.ax.get_position().get_points() | ||
cbar.ax.set_position([cbar_points[0, 0], | ||
points[0, 1], | ||
cbar_points[1, 0] - cbar_points[0, 0], | ||
points[1, 1] - points[0, 1]]) | ||
|
||
def _make_legend(self): | ||
pass | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 should be moved to 0.24.0