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

Skip to content

Commit 3809803

Browse files
committed
BUG: Ensure polar radial limits are nonsingular.
This is related to a warning seen in #2827, but doesn't fix the main bug.
1 parent 52ab847 commit 3809803

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/matplotlib/projections/polar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
from matplotlib.ticker import Formatter, Locator, FormatStrFormatter
2020
from matplotlib.transforms import Affine2D, Affine2DBase, Bbox, \
2121
BboxTransformTo, IdentityTransform, Transform, TransformWrapper, \
22-
ScaledTranslation, blended_transform_factory, BboxTransformToMaxOnly
22+
ScaledTranslation, blended_transform_factory, BboxTransformToMaxOnly, \
23+
nonsingular
2324
import matplotlib.spines as mspines
2425

2526

@@ -222,7 +223,7 @@ def refresh(self):
222223

223224
def view_limits(self, vmin, vmax):
224225
vmin, vmax = self.base.view_limits(vmin, vmax)
225-
return min(0, vmin), vmax
226+
return nonsingular(min(0, vmin), vmax)
226227

227228

228229
class PolarAxes(Axes):

0 commit comments

Comments
 (0)