Skip to content

Polar limits enhancements #4699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: Ensure polar radial limits are nonsingular.
This is related to a warning seen in #2827, but doesn't fix the main
bug.
  • Loading branch information
QuLogic committed Aug 16, 2017
commit 3809803d30d37698a460e096cec12cecfc1f3fde
5 changes: 3 additions & 2 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
from matplotlib.ticker import Formatter, Locator, FormatStrFormatter
from matplotlib.transforms import Affine2D, Affine2DBase, Bbox, \
BboxTransformTo, IdentityTransform, Transform, TransformWrapper, \
ScaledTranslation, blended_transform_factory, BboxTransformToMaxOnly
ScaledTranslation, blended_transform_factory, BboxTransformToMaxOnly, \
nonsingular
import matplotlib.spines as mspines


Expand Down Expand Up @@ -222,7 +223,7 @@ def refresh(self):

def view_limits(self, vmin, vmax):
vmin, vmax = self.base.view_limits(vmin, vmax)
return min(0, vmin), vmax
return nonsingular(min(0, vmin), vmax)


class PolarAxes(Axes):
Expand Down