Skip to content

Notebook plotting regression in 3.4.0rc* #19701

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

Closed
ericpre opened this issue Mar 14, 2021 · 2 comments · Fixed by #19762
Closed

Notebook plotting regression in 3.4.0rc* #19701

ericpre opened this issue Mar 14, 2021 · 2 comments · Fixed by #19762
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone

Comments

@ericpre
Copy link
Member

ericpre commented Mar 14, 2021

Bug report

Bug summary

Blitting support have been added in the notebook backend, however, it is fully working, see #19633 and in particular #19633 (comment).

This breaks plotting for libraries using the supports_blit property of the canvas to know if blitting should be used.

Even if I am really looking forward using blitting in the notebook/ipympl backend, in 3.4.0rc, it seems that this is not ready to be fully used and it breaks plotting in the notebook of hyperspy.
Would it be make sense to have supports_blit returns False for the notebook backend until blitting is working fine?

Code for reproduction

It is difficult to provide a minimum example because of #19633 (comment) but it can be reproduce using hyperspy:

# Paste your code here
%matplotlib notebook
import hyperspy.api as hs

s = hs.datasets.artificial_data.get_core_loss_eels_line_scan_signal()
s.plot()

Actual outcome

notebook_blitting

Similarly ss reported in by @ianhi in #19633, this will use 100% of a CPU. Also, the width of the figure is not correct and the axes disappear when changing the size of the figure:
notebook_blitting-resize

Expected outcome

Using blitting should work as with other backend, until then, blitting should not be defined as supported for the notebook/ipympl backend.

Matplotlib version

  • Operating system:
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)):
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version:
  • Jupyter version (if applicable):
  • Other libraries:
@tacaswell tacaswell added this to the v3.4.0 milestone Mar 23, 2021
@tacaswell tacaswell added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Mar 23, 2021
tacaswell added a commit to tacaswell/matplotlib that referenced this issue Mar 24, 2021
We now implement the required underlying methods (copy_from_bbox and
restore_region), but there are issues with the double buffering in nbagg,
initialization issues, and with updates to the front end being dropped.

For mpl3.4.0 over-ride the class property that checks for the required methods
until we can fix the issues with blitting.

Closes matplotlib#19701
@tacaswell
Copy link
Member

I agree we need to back off claiming nbagg supports blitting (so we can get 3.4.0 out the door), hopefully this is simple but detail oriented fix in the book keeping in nbagg and we can have this cleared up for 3.4.1.

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Mar 24, 2021
We now implement the required underlying methods (copy_from_bbox and
restore_region), but there are issues with the double buffering in nbagg,
initialization issues, and with updates to the front end being dropped.

For mpl3.4.0 over-ride the class property that checks for the required methods
until we can fix the issues with blitting.

Closes matplotlib#19701
@ericpre
Copy link
Member Author

ericpre commented Mar 24, 2021

Thanks, I feel less worried now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants