File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 2323 release = "unknown"
2424
2525
26-
2726# -- Project information -----------------------------------------------------
2827
2928project = "mpl_pan_zoom"
Original file line number Diff line number Diff line change 11__all__ = [
22 "PanManager" ,
33]
4+
5+
46class PanManager :
57 """
68 Enable panning a plot with any mouse button.
@@ -50,7 +52,9 @@ def enable(self):
5052 raise RuntimeError ("The PanManager is already enabled" )
5153
5254 self ._id_press = self .fig .canvas .mpl_connect ("button_press_event" , self .press )
53- self ._id_release = self .fig .canvas .mpl_connect ("button_release_event" , self .release )
55+ self ._id_release = self .fig .canvas .mpl_connect (
56+ "button_release_event" , self .release
57+ )
5458
5559 def disable (self ):
5660 """
@@ -103,7 +107,9 @@ def press(self, event):
103107 ):
104108 a .start_pan (x , y , event .button )
105109 self ._xypress .append ((a , i ))
106- self ._id_drag = self .fig .canvas .mpl_connect ("motion_notify_event" , self ._mouse_move )
110+ self ._id_drag = self .fig .canvas .mpl_connect (
111+ "motion_notify_event" , self ._mouse_move
112+ )
107113
108114 def release (self , event ):
109115 self ._cancel_action ()
Original file line number Diff line number Diff line change 33__all__ = [
44 "zoom_factory" ,
55]
6+
7+
68# based on https://gist.github.com/tacaswell/3144287
79def zoom_factory (ax , base_scale = 1.1 ):
810 """
Original file line number Diff line number Diff line change @@ -7,16 +7,13 @@ url = https://github.com/ianhi/mpl-pan-zoom
77author = Ian Hunt-Isaak
8899license = BSD-3-Clause
10- license_file = LICENSE
10+ license_files = LICENSE
1111classifiers =
1212 Development Status :: 2 - Pre-Alpha
1313 License :: OSI Approved :: BSD License
1414 Natural Language :: English
1515 Programming Language :: Python :: 3
1616 Programming Language :: Python :: 3 :: Only
17- Programming Language :: Python :: 3.7
18- Programming Language :: Python :: 3.8
19- Programming Language :: Python :: 3.9
2017 Programming Language :: Python :: Implementation :: CPython
2118project_urls =
2219 Source Code =https://github.com/ianhi/mpl-pan-zoom
@@ -26,7 +23,7 @@ packages = find:
2623install_requires =
2724 matplotlib
2825 numpy
29- python_requires = >=3.7
26+ python_requires = >=3.8
3027zip_safe = False
3128
3229[options.extras_require]
You can’t perform that action at this time.
0 commit comments