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

Several bug when MatplotFigure widget self.pos is different from (0,0) #10

Closed mp-007 closed 2 years ago

mp-007 commented 2 years ago

When MatplotFigure widget self.pos is different from (0,0), These bugs can happen:

Kv in main.py to reproduce error:

KV = '''
#:import MatplotFigure graph_widget

Screen
    figure_wgt:figure_wgt
    BoxLayout:
        orientation:'vertical'
        BoxLayout:
            size_hint_y:0.2
            Button:
                text:"home"
                on_release:app.home()
            ToggleButton:
                group:'touch_mode'
                state:'down'
                text:"pan" 
                on_release:
                    app.set_touch_mode('pan')
                    self.state='down'
            ToggleButton:
                group:'touch_mode'
                text:"zoombox"  
                on_release:
                    app.set_touch_mode('zoombox')
                    self.state='down'                     
            ToggleButton:
                group:'touch_mode'
                text:"cursor"  
                on_release:
                    app.set_touch_mode('cursor')
                    self.state='down'  
        BoxLayout:
            BoxLayout:
                size_hint_x:0.2
            MatplotFigure:
                id:figure_wgt              
            BoxLayout:
                size_hint_x:0.2                
        BoxLayout:
            size_hint_y:0.2            
'''