mp-007 / kivy_matplotlib_widget

A fast matplotlib rendering for Kivy based on Kivy_matplotlib project and kivy scatter. Matplotlib used 'agg' backend
MIT License
35 stars 7 forks source link

There is an accumulative distance error when pan with mouse #6

Closed ShannonZ closed 2 years ago

ShannonZ commented 2 years ago

Comparing with the behaviour of a interactively matplotlib backend, the pan operation in this repo has an accumulative error.

mp-007 commented 2 years ago

@ShannonZ can you show me the error. I cannot reproduced this error.

mp-007 commented 2 years ago

the code was based on this https://stackoverflow.com/a/19829987

mp-007 commented 2 years ago

I saw the error. I will try to fix it. Thanks for reporting this behavior.

mp-007 commented 2 years ago

by dividing dx and dy by 2, seem to fix the behavior with the mouse. I need to validate this with a finger touch. image

ShannonZ commented 2 years ago

by dividing dx and dy by 2, seem to fix the behavior with the mouse. I need to validate this with a finger touch. image

Yep.