Skip to content
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

gui matplotlib backend warning: fix conflict between y limits and autoscale #4204

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

payno
Copy link
Member

@payno payno commented Jan 21, 2025

This PR is an attempt to fix a warning appearing with matplotlib 3.10

See details in #4203

close #4203

@payno
Copy link
Member Author

payno commented Jan 21, 2025

What is not clear to me (does this PR creates a conflict with existing code) is the usage of set_autoscaley_on for ax2 in the initialization of the backend

I guess @t20100 expertise will be required here.

@payno payno requested a review from t20100 January 21, 2025 06:22
@t20100
Copy link
Member

t20100 commented Feb 3, 2025

I still get the warning with this PR. I have a look at it.

@t20100
Copy link
Member

t20100 commented Feb 3, 2025

Each call to set_ylim sets autoscaley_on to False...

Let's use set_ybound which does not update autoscaley_on and also takes care of sorting ymin, ymax according to their value and whether the axis is inverted or not.

Set set_ylim's auto argument according to plot's keepDataAspectRatio

@payno payno merged commit 3c8c2b3 into main Feb 3, 2025
8 of 9 checks passed
@t20100 t20100 deleted the fix_4203 branch February 3, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warning from matplotlib
2 participants