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

"%matplotlib notebook" not working in firefox with matplotlib 3.3.1 #18481

Closed
stefanazzz opened this issue Sep 14, 2020 · 7 comments · Fixed by #18732
Closed

"%matplotlib notebook" not working in firefox with matplotlib 3.3.1 #18481

stefanazzz opened this issue Sep 14, 2020 · 7 comments · Fixed by #18732
Milestone

Comments

@stefanazzz
Copy link

Bug report

Bug summary

using "%matplotlib notebook" to get interactive plots in notebook running on firefox browser stopped working upon upgrade from matplotlib 3.1.1 to 3.3.1. Firefox 68.0.1 (64-bit) for Linux MINT.

Still works fine in google chrome. Other interactive like "%matplotlib widget" or "%matplotlib ipympl" are OK in both firefox & chrome.

No error message, just a small triangle appears in lieu if the plot in the notebook.

Code for reproduction

# Paste your code here
%matplotlib notebook
import matplotlib
import matplotlib.pyplot as plt
fig,ax=plt.subplots()
ax.plot([0,1,2],[1.1,2.3,4],'o');
print(matplotlib.__version__)
#
#

Actual outcome

image

# If applicable, paste the console output here
#
#

Expected outcome

image

Used to work in matplotlib 3.1.1

Matplotlib version

  • Operating system: Linux MINT

  • Matplotlib version: 3.3.1

  • Matplotlib backend (print(matplotlib.get_backend())): nbAgg

  • Python version: 3.7.8 | packaged by conda-forge

  • Jupyter version (if applicable):
    jupyter core : 4.6.3
    jupyter-notebook : 6.1.4
    qtconsole : 4.7.5
    ipython : 7.17.0
    ipykernel : 5.3.4
    jupyter client : 6.1.6
    jupyter lab : not installed
    nbconvert : 5.6.1
    ipywidgets : 7.5.1
    nbformat : 5.0.7
    traitlets : 4.3.3

  • Other libraries:

install from conda

channels:

  • gimli
  • anaconda
  • conda-forge
  • defaults
@jklymak
Copy link
Member

jklymak commented Sep 14, 2020

I cannot reproduce this on master with Firefox (80.0.1 (64-bit)) on my mac. 1) that's a pretty old firefox? 2) maybe change the order to put the %matplotlib notebook after the import?

@QuLogic
Copy link
Member

QuLogic commented Sep 14, 2020

I can reproduce this with IceCat, which is still on the 68 ESR line.

@QuLogic
Copy link
Member

QuLogic commented Sep 14, 2020

I thought it was older, but you actually need Firefox 69 for ResizeObserver. I could try and find a shim if we want to continue supporting ESR.

@QuLogic
Copy link
Member

QuLogic commented Sep 14, 2020

Ah, so it turns out that Firefox 68 does support ResizeObserver, but it was experimental and hidden behind a flag. If you go to about:config, and set layout.css.resizeobserver.enabled to true, then it's fixed. As there's a workaround, I don't want to hold up 3.3.2 on this, but maybe for 3.3.3 (if that happens), we can think about the shim idea.

@QuLogic QuLogic added this to the v3.3.3 milestone Sep 15, 2020
@stefanazzz
Copy link
Author

stefanazzz commented Sep 16, 2020 via email

@QuLogic
Copy link
Member

QuLogic commented Sep 16, 2020

It's enabled in all releases after 68; this is only a problem in ESR.

@stefanazzz
Copy link
Author

stefanazzz commented Sep 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants