Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39358b2

Browse files
committed
Add origin as sticky point for radial axes
1 parent f96fac0 commit 39358b2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/projections/polar.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,10 @@ class RadialAxis(maxis.YAxis):
717717
__name__ = 'radialaxis'
718718
axis_name = 'radius'
719719

720+
def __init__(self, *args, **kwargs):
721+
super().__init__(*args, **kwargs)
722+
self.sticky_edges.y.append(0)
723+
720724
def _get_tick(self, major):
721725
if major:
722726
tick_kw = self._major_tick_kw
@@ -849,6 +853,7 @@ def __init__(self, *args, **kwargs):
849853
kwargs.pop('rlabel_position', 22.5))
850854

851855
Axes.__init__(self, *args, **kwargs)
856+
self.use_sticky_edges = True
852857
self.set_aspect('equal', adjustable='box', anchor='C')
853858
self.cla()
854859
__init__.__doc__ = Axes.__init__.__doc__

0 commit comments

Comments
 (0)