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

Skip to content

Small improvements related to radar_chart example. #22464

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 1 commit into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions examples/specialty_plots/radar_chart.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def transform_path_non_affine(self, path):
class RadarAxes(PolarAxes):

name = 'radar'
# use 1 line segment to connect specified points
RESOLUTION = 1
PolarTransform = RadarTransform

def __init__(self, *args, **kwargs):
Expand Down
7 changes: 5 additions & 2 deletions lib/matplotlib/projections/polar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,9 +1444,12 @@ def drag_pan(self, button, key, x, y):
self.set_rmax(p.rmax / scale)


# to keep things all self contained, we can put aliases to the Polar classes
# To keep things all self-contained, we can put aliases to the Polar classes
# defined above. This isn't strictly necessary, but it makes some of the
# code more readable (and provides a backwards compatible Polar API)
# code more readable, and provides a backwards compatible Polar API. In
# particular, this is used by the :doc:`/gallery/specialty_plots/radar_chart`
# example to override PolarTransform on a PolarAxes subclass, so make sure that
# that example is unaffected before changing this.
PolarAxes.PolarTransform = PolarTransform
PolarAxes.PolarAffine = PolarAffine
PolarAxes.InvertedPolarTransform = InvertedPolarTransform
Expand Down