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

Allow setting of aspect ratio for Axes in rcParams - Draft PR #30017

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

Draft
ebubekir-pulat wants to merge 4 commits into matplotlib:main
base: main
Choose a base branch
Loading
from ebubekir-pulat:feature-for-issue-8088

Conversation

Copy link

@ebubekir-pulat ebubekir-pulat commented May 5, 2025

** DRAFT PR **

closes #8088

Implementing feature that allows the setting of a default aspect ratio for axes, not just images. New features involves the addition of the rcParam: axes.aspect.

Below is a screenshot showing the feature in action (before the last couple of recent upstream commits were merged into the branch):
image

Copy link
Author

ebubekir-pulat commented May 20, 2025
edited
Loading

I made a simple and basic implementation for this feature, before realising there was another draft request (#25642) open. Should I try to build off that Draft PR, or is my simple fix an ok starting point?

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

I'm only +0.1 on this. There's low need for it. A fixed aspect can never be part of a style because it only works reasonably when you know your data is in a similar aspect. I concede though, that it may be helpful on helper functions for custom plot types.

This should be introduced together with axes.adjustable.

This needs a "what's new entry - https://matplotlib.org/devdocs/users/next_whats_new/README.html

ebubekir-pulat reacted with thumbs up emoji
Copy link
Author

ebubekir-pulat commented May 24, 2025
edited
Loading

I've done some basic testing of the new implementation and it seems good. Apart from more complete testing, and adding a "What's New Entry", is there anything else to change or improve on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@timhoffm timhoffm timhoffm left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
Status: Waiting for author
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

rcParams for plt.axis('equal') not working?

AltStyle によって変換されたページ (->オリジナル) /