Skip to content

Commit 2df6720

Browse files
committed
Small improvements related to radar_chart example.
A small block at the end of polar.py is described as not strictly necessary, but is in fact used by the radar_chart example. Perhaps a unittest would be better, but for now, just note that this should not be changed without manual checking. RESOLUTION is unused; remove it.
1 parent cc71742 commit 2df6720

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/specialty_plots/radar_chart.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def transform_path_non_affine(self, path):
5555
class RadarAxes(PolarAxes):
5656

5757
name = 'radar'
58-
# use 1 line segment to connect specified points
59-
RESOLUTION = 1
6058
PolarTransform = RadarTransform
6159

6260
def __init__(self, *args, **kwargs):

lib/matplotlib/projections/polar.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,9 +1444,12 @@ def drag_pan(self, button, key, x, y):
14441444
self.set_rmax(p.rmax / scale)
14451445

14461446

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

0 commit comments

Comments
 (0)