superjax / plotWindow

A tabbed plot window for matplotlib plots using PyQt5
23 stars 5 forks source link

Fails for Matplotlib > 3.0.3 #1

Closed jbwillis closed 4 years ago

jbwillis commented 4 years ago

I'd be happy to work on fixing this, but I thought I'd submit an issue for it.

When using Matplotlib > 3.0.3 and running python3 plotWindow.py, I get the following error:

Traceback (most recent call last):
  File "plotWindow.py", line 56, in <module>
    f = plt.figure()
  File "/home/jbwillis/scratch/python-matplotlib/env/lib/python3.6/site-packages/matplotlib/pyplot.py", line 539, in figure
    **kwargs)
  File "/home/jbwillis/scratch/python-matplotlib/env/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 3252, in new_figure_manager
    return cls.new_figure_manager_given_figure(num, fig)
  File "/home/jbwillis/scratch/python-matplotlib/env/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 3258, in new_figure_manager_given_figure
    canvas = cls.FigureCanvas(figure)
TypeError: 'NoneType' object is not callable

I have installed Matplotlib 3.0.3 and verified that running the above works properly.

superjax commented 4 years ago

Interesting. I posted this code on a stackoverflow answer and someone commented with the same bug.

I don't have a new enough version of matplotlib to repro this. If you have a fix, I'd appreciate it!

jbwillis commented 4 years ago

This came up when I installed a package that updated matplotlib. Currently my fix is to install matplotlib 3.0.3 again. I'll look into it soon.

superjax commented 4 years ago

Closed by #2