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

nbagg blit support #4288

Closed
Closed
Assignees
tacaswell
@azjps

Description

@azjps

Hi, on the nbagg backend, blit doesn't seem to update without re-drawing. Here's a simple example:

importmatplotlib.pyplotaspltprev_artist=Nonecur_y=0.1defonclick_handle(event):"""Should draw elevating green line on each mouse click"""globalax,bg,prev_artist,cur_yax.figure.canvas.restore_region(bg)ifprev_artist:prev_artist.remove()cur_y+=0.1prev_artist=ax.plot([0,1], [cur_y,cur_y],'g')[0]ax.draw_artist(prev_artist)ax.figure.canvas.blit(ax.bbox)print"Drew line"ax=plt.gca()ax.plot([0,1], [0,1],'r')# ax.figure.canvas.draw()bg=ax.figure.canvas.copy_from_bbox(ax.bbox)ax.figure.canvas.mpl_connect('button_press_event',onclick_handle)

With%matplotlib nbagg, clicking on the plot doesn't cause any updates until the plot is re-drawn. With other backends (say qt) the plot updates immediately on clicking.

An unrelated oddity, if I uncomment the draw command and try re-drawing the figure just disappears (edit - on 1.4.3; seems fixed on 1.5.1dev1).

If it helps, IPython version is 2.3.0 and matplotlib is 1.4.3/1.5.1dev1; occurs on both chrome and firefox.UAT including animation example more or less run fine.

(Coincidental to the other nbagg animation issue just posted. Google led tothis post also.)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp