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

wwplot is broken: AttributeError: 'Legend' object has no attribute 'set_draggable' #2

Open
yurivict opened this issue Jan 11, 2020 · 3 comments

Comments

@yurivict
Copy link

yurivict commented Jan 11, 2020

While updating the FreeBSD port I found this problem:

$ wwplot 
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
Traceback (most recent call last):
  File "/usr/local/bin/wwplot", line 20, in <module>
    AW = ApplicationWindow()
  File "/usr/local/lib/python3.7/site-packages/WWplot/application_window.py", line 62, in __init__
    self.add_tab()
  File "/usr/local/lib/python3.7/site-packages/WWplot/application_window.py", line 116, in add_tab
    self.update_plot()
  File "/usr/local/lib/python3.7/site-packages/WWplot/application_window.py", line 168, in update_plot
    self.plot.redraw_canvas()
  File "/usr/local/lib/python3.7/site-packages/WWplot/plot.py", line 107, in redraw_canvas
    self.axes.legend().set_draggable(True)  # has to be called after tight_layout
AttributeError: 'Legend' object has no attribute 'set_draggable'

Both 0.0.7 and 0.0.8 have this problem.

@yurivict yurivict changed the title version 0.0.8 is broken: AttributeError: 'Legend' object has no attribute 'set_draggable' wwplot is broken: AttributeError: 'Legend' object has no attribute 'set_draggable' Jan 11, 2020
@wwmm
Copy link
Owner

wwmm commented Jan 11, 2020

Which matplotlib version do you have? Here on Linux I have version 3.1.2 and it has this method.

@yurivict
Copy link
Author

I have matplotlib-2.2.4 because there's some sort of incompatibility of matplotlib-3 with python-2.7

@wwmm
Copy link
Owner

wwmm commented Jan 12, 2020

As far as I could see the "missing" method was added in version 3.0.

Python 2.7? I think that matplotlib 3 is intended for Python 3. That may explain why it was not compatible.

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

No branches or pull requests

2 participants