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

motion_notify_event from backend_kivy.py is not found? #81

Open
chrisInTheCode opened this issue Sep 29, 2023 · 7 comments
Open

motion_notify_event from backend_kivy.py is not found? #81

chrisInTheCode opened this issue Sep 29, 2023 · 7 comments

Comments

@chrisInTheCode
Copy link

chrisInTheCode commented Sep 29, 2023

Hi! I am relatively newer to python (and certainly kivy and matplotlib) and am working on a project. I am trying to use a matplotlib graph within kivy, which seems like it works fine - except for that I'm getting an internal error inside of kivy matplotlib backend that I cannot trace back to my own code.

Here is the error I am getting:

kivy\garden\matplotlib\backend_kivy.py", line 1204, in _on_mouse_pos self.motion_notify_event(x, y, guiEvent=None) ^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'FigureCanvasKivyAgg' object has no attribute 'motion_notify_event'. Did you mean: 'enter_notify_event'?

Now, if I try to trace back and find motion_notify_event, the farthest back I can get is the _on_mouse_pos() method within backend_kivy.py. It seems to have a definition for leave_notify_event and enter_notify_event, but not one for motion_notify_event. There are several references throughout backend_kivy.py, but I cannot find where it ever provides a definition for how to handle it.

Is this a known bug within backend_kivy? Am I just missing something on my side to handle this myself? I know this is not much to go on, so just let me know what else I need to provide. I can't trace it back to anywhere in my code and it is unreasonable to put the entire project here. Thanks for any help or ideas!

Versions:
python==3.11.5
Kivy==2.2.1
kivy-deps.angle==0.3.3
kivy-deps.glew==0.3.1
kivy-deps.sdl2==0.6.0
Kivy-Garden==0.1.5
kivy-matplotlib-widget==0.6.1
matplotlib==3.8.0
matplotlib-label-lines==0.7.0

@HyTurtle
Copy link

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#removal-of-deprecated-apis

Would be the matplotlib version, could leave to recipe default (3.5.4), use a version prior to 3.8.0 or alter this repo to support it.

@mp-007
Copy link

mp-007 commented Sep 29, 2023

At the moment, kivy matplotlib garden is not compatible with matplotlib 3.8. As an alternative, you can use my library if you want. For interactive graph it is much faster. https://github.com/mp-007/kivy_matplotlib_widget.

Also, like @HyTurtle say, the android recipe is set to 3.5.4.

@chrisInTheCode
Copy link
Author

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.8.0.html#removal-of-deprecated-apis

Would be the matplotlib version, could leave to recipe default (3.5.4), use a version prior to 3.8.0 or alter this repo to support it.

Thanks for the info! Will try some things out.

@chrisInTheCode
Copy link
Author

At the moment, kivy matplotlib garden is not compatible with matplotlib 3.8. As an alternative, you can use my library if you want. For interactive graph it is much faster. https://github.com/mp-007/kivy_matplotlib_widget.

Also, like @HyTurtle say, the android recipe is set to 3.5.4.

Thanks for the info and library, I'll check it out. Thanks!

@mp-007
Copy link

mp-007 commented Sep 29, 2023

Wait. Your are already using my library (kivy-matplotlib-widget==0.6.1) ?? Please don't use kivy garden matplotlib at the same time. It's 2 differents libraries.

If you have an code example. I can certainly help you (ask on kivy discord or in my github repo).

@tcaduser
Copy link

Please note they are migrating to this repo:
https://github.com/kivy-garden/matplotlib

to be more consistent with the modern garden format.

@tcaduser
Copy link

Please note this existing issue:
kivy-garden/matplotlib#1

Also note that the Android and iOS recipes are in the 3.7 series, and updating them is not easy. I contributed the iOS recipe for matplot 3.7.5. I assume the garden recipe and the recipes would need to be synchronized.

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

4 participants