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

Fix bbox of polar Axes#29051

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

Open
QuLogic wants to merge4 commits intomatplotlib:main
base:main
Choose a base branch
Loading
fromQuLogic:fix-polar-bbox
Open
Show file tree
Hide file tree
Changes from1 commit
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
PrevPrevious commit
NextNext commit
Use the correct aspect ratio for non-full polar Axes
No longer expand the wedge bbox to make a square, but instead export atwhatever size it has. Then also apply its aspect ratio to the Axesitself, so that the Axes' 'active' position is correct.This allows wedge-shaped PolarAxes to expand to fill their allocatedspace.
  • Loading branch information
@QuLogic
QuLogic committedJun 17, 2025
commite1d2781c3338366a7ffe59ecdd18df78bff370ec
7 changes: 1 addition & 6 deletionslib/matplotlib/projections/polar.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -773,12 +773,6 @@ def get_points(self):
wedge.set_width(width)
self.update_from_path(wedge.get_path(), ignore=True)

# Ensure equal aspect ratio.
w, h = self._points[1] - self._points[0]
deltah = max(w - h, 0) / 2
deltaw = max(h - w, 0) / 2
self._points += np.array([[-deltaw, -deltah], [deltaw, deltah]])

self._invalid = 0

return self._points
Expand DownExpand Up@@ -974,6 +968,7 @@ def get_yaxis_text2_transform(self, pad):
def draw(self, renderer):
self._unstale_viewLim()
self.axesLim.get_points() # Unstale bbox and Axes patch.
self.set_aspect(self.axesLim.height / self.axesLim.width)
if isinstance(self.patch, mpatches.Wedge):
# Backwards-compatibility: Any subclassed Axes might override the
# patch to not be the Wedge that PolarAxes uses.
Expand Down
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

[8]ページ先頭

©2009-2025 Movatter.jp