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

animation fixes#4995

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
WeatherGod merged 8 commits intomatplotlib:masterfromtacaswell:fix_animation
Sep 1, 2015
Merged

Conversation

tacaswell
Copy link
Member

Using draw was triggering infinite recursion, using draw_idle does not.

This fixes the recursion depth reported in#4967

attn@WeatherGod

Using draw was triggering infinite recursion, using draw_idle does not.
This was introduced bymatplotlib#4800. We need to disconnect the initial drawcallback in _start() before doing _init_draw(), otherwise, we end upback in _start() when the draw_event fires.Also go ahead and remove the call to _init_draw() in __init__(), since_start() will handle it.
@tacaswell
Copy link
MemberAuthor

I also cherry-picked@dopplershift 's infinite recursion commit onto this PR just to be safe.

For blitted animations in is essential to return a list of the animatedartists.  However, is other cases you can get away with out returningsuch a list.In the case of blitting it is important to make sure that the animationflags on the animated artist are set correctly, t his commit makes surethat we check that we actually got an iterable before trying to iterateover it.
There are race conditions where _blit_clear may be called beforethe first draw (which is what will grab the backgrounds)
@tacaswelltacaswell changed the titleFIX: use draw_idle instead of drawanimation fixesAug 27, 2015
@tacaswelltacaswell added this to thenext point release milestoneAug 27, 2015
@tacaswell
Copy link
MemberAuthor

@WeatherGod I think I have fixed the source of the not iterable bugs. All of the animation examples run correctly on this branch.

@WeatherGod
Copy link
Member

And all of my examples now run too. There is one example of mine that is still showing a weird off-by-one-frame error, but I haven't yet determined if that is a bug on my part or a bug in matplotlib. This brings everything back to a functional state.

try:
a.figure.canvas.restore_region(bg_cache[a])
except KeyError:
# something has happened out of order?
Copy link
Member

Choose a reason for hiding this comment

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

Do we really want to be swallowing this exception silently? Should we at least attach one of our logging stuff to it?

@tacaswell
Copy link
MemberAuthor

@WeatherGod I backed out the changes you commented on.

I am still not happy with the iterable issue. The underlying issue is that if you are using blitting then the animated artistsmust haveart.animated == True or you will get the auto-redrawdraw_idle calls causing full re-draws (which is a problem).

@tacaswell
Copy link
MemberAuthor

@WeatherGod What is the history of the animated property?

@mdehoon
Copy link
Contributor

Without blitting, the _post_draw method uses draw_idle; with blitting, _post_draw calls _blit_draw, which calls ax.figure.canvas.blit. This is odd; I would expect blitting to be done at idle time, just like regular drawing.

@tacaswell
Copy link
MemberAuthor

@mdehoon I agree that is a bit odd, but I think it has to be this way so that the client code can manage the blitted artists + backgrounds.

I agree it would be better if we could push the blitting logic onto the other side of the canvas interface, but that is a bigger project that we can do before 1.5.

@WeatherGod
Copy link
Member

You'd have to ask others. It predates me.
On Aug 27, 2015 11:49 PM, "Thomas A Caswell"notifications@github.com
wrote:

@WeatherGodhttps://github.com/WeatherGod What is the history of the
animated property?


Reply to this email directly or view it on GitHub
#4995 (comment)
.

@mdehoon
Copy link
Contributor

@tacaswell Once the blitting is done on the other side of the canvas interface, I can fix the MacOSX backend to handle blitting. I'm OK with waiting until after 1.5.

@tacaswell
Copy link
MemberAuthor

@WeatherGod If you are happy with this can you merge it?

@WeatherGod
Copy link
Member

Things look good here. Merging...

WeatherGod added a commit that referenced this pull requestSep 1, 2015
@WeatherGodWeatherGod merged commit78bb82c intomatplotlib:masterSep 1, 2015
@tacaswelltacaswell deleted the fix_animation branchOctober 29, 2015 16:08
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
None yet
Projects
None yet
Milestone
v1.5.0
Development

Successfully merging this pull request may close these issues.

4 participants
@tacaswell@WeatherGod@mdehoon@dopplershift

[8]ページ先頭

©2009-2025 Movatter.jp