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 issue with clf not clearing constrainedlayout#10552

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
tacaswell merged 1 commit intomatplotlib:masterfromjklymak:fix-cl-with-clf
Feb 21, 2018

Conversation

jklymak
Copy link
Member

PR Summary

As noted by@afvincent (on gitter)

importmatplotlib.pyplotasplt#import matplotlib as mpl#print(mpl.__version__)  #  --> 2.2.0rc1plt.ion()# --> no warning without itfig=plt.figure(num=1,clear=True,#--> no effect on the warninconstrained_layout=True)ax=fig.subplots()ax.plot([1,2])

if called twice in an interactive session doesn't work on master.

The new axis is still being constrained by the presence of the old (cleared) one and gets shrunk to nothing.

This change properly resets the constrained_layout mechanism whenfigure.clf() is called.

afvincent reacted with thumbs up emoji
@jklymakjklymak added this to thev2.2.0 milestoneFeb 21, 2018
@afvincent
Copy link
Contributor

afvincent commentedFeb 21, 2018
edited
Loading

@jklymak I just tried locally your PR and it looks like I now get the behavior that I was expecting in the first place :): no warning withclear=True, and the behavior that you described above withclear=False.

Edit: Unfortunately CI seems a bit less happy than I am :/...

@jklymak
Copy link
MemberAuthor

Yep. Testing is good. I was being too aggressive in re-instantiating the layoutbox; the gridspec actually instantiates the figure's layoutbox...

@jklymakjklymak added Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: geometry managerLayoutEngine, Constrained layout, Tight layout labelsFeb 21, 2018
@jklymak
Copy link
MemberAuthor

Appveyor seems backlogged, but other tests seem fine now

@tacaswelltacaswell merged commit9b48fd8 intomatplotlib:masterFeb 21, 2018
dstansby added a commit that referenced this pull requestFeb 22, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.topic: geometry managerLayoutEngine, Constrained layout, Tight layout
Projects
None yet
Milestone
v2.2.0
Development

Successfully merging this pull request may close these issues.

3 participants
@jklymak@afvincent@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp