Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Colorbar redo again!#20501

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletionsdoc/api/next_api_changes/behavior/20054-JMK.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
Axes used to make colorbar now wrapped
======================================

The axes used to place a colorbar is now wrapped by a new parent class
(``ColorbarAxes``) when the colorbar is created::

cb = fig.colorbar(im, cax=cax)

This means that ``cb.ax`` is no longer the same object as ``cax``. However,
we map all the methods from ``cb.ax`` onto ``cax`` so ``cax`` should remain
functionally the same as ``cb.ax``.

Colorbar lines no longer clipped
================================

Expand Down
6 changes: 5 additions & 1 deletionlib/matplotlib/_constrained_layout.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -575,7 +575,11 @@ def _reposition_colorbar(cbax, renderer, *, offset=None):
pbcb = trans_fig_to_subfig.transform_bbox(pbcb)
cbax.set_transform(fig.transSubfigure)
cbax._set_position(pbcb)
cbax.set_aspect(aspect, anchor=anchor, adjustable='box')
cbax.set_anchor(anchor)
if location in ['bottom', 'top']:
aspect = 1 / aspect
cbax.set_box_aspect(aspect)
cbax.set_aspect('auto')
return offset


Expand Down
2 changes: 2 additions & 0 deletionslib/matplotlib/axes/_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2380,6 +2380,8 @@ def _update_patch_limits(self, patch):
return
patch_trf = patch.get_transform()
updatex, updatey = patch_trf.contains_branch_seperately(self.transData)
if not (updatex or updatey):
return
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Calling the transform below blows up needlessly because it is called, and then does nothing....

if self.name != "rectilinear":
# As in _update_line_limits, but for axvspan.
if updatex and patch_trf == self.get_yaxis_transform():
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp