8000 Fix warnings in examples · matplotlib/matplotlib@1e671bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e671bb

Browse files
committed
Fix warnings in examples
Fix example
1 parent 2c91f98 commit 1e671bb

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

galleries/examples/axisartist/demo_axis_direction.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ def setup_axes(fig, rect):
2020
"""Polar projection, but in a rectangular box."""
2121
# see demo_curvelinear_grid.py for details
2222
grid_helper = GridHelperCurveLinear(
23-
Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform(),
23+
(
24+
Affine2D().scale(np.pi/180., 1.) +
25+
PolarAxes.PolarTransform(apply_theta_transforms=False)
26+
),
2427
extreme_finder=angle_helper.ExtremeFinderCycle(
2528
20, 20,
2629
lon_cycle=360, lat_cycle=None,

galleries/examples/axisartist/demo_curvelinear_grid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def curvelinear_test2(fig):
5454

5555
# PolarAxes.PolarTransform takes radian. However, we want our coordinate
5656
# system in degree
57-
tr = Affine2D().scale(np.pi/180, 1) + PolarAxes.PolarTransform()
57+
tr = Affine2D().scale(np.pi/180, 1) + PolarAxes.PolarTransform(
58+
_apply_theta_transforms=False)
5859
# Polar projection, which involves cycle, and also has limits in
5960
# its coordinates, needs a special method to find the extremes
6061
# (min, max of the coordinate within the view).

galleries/examples/axisartist/demo_fl 10000 oating_axes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def setup_axes2(fig, rect):
5454
With custom locator and formatter.
5555
Note that the extreme values are swapped.
5656
"""
57-
tr = PolarAxes.PolarTransform()
57+
tr = PolarAxes.PolarTransform(_apply_theta_transforms=False)
5858

5959
pi = np.pi
6060
angle_ticks = [(0, r"$0$"),
@@ -99,7 +99,8 @@ def setup_axes3(fig, rect):
9999
# scale degree to radians
100100
tr_scale = Affine2D().scale(np.pi/180., 1.)
101101

102-
tr = tr_rotate + tr_scale + PolarAxes.PolarTransform()
102+
tr = tr_rotate + tr_scale + PolarAxes.PolarTransform(
103+
_apply_theta_transforms=False)
103104

104105
grid_locator1 = angle_helper.LocatorHMS(4)
105106
tick_formatter1 = angle_helper.FormatterHMS()

galleries/examples/axisartist/demo_floating_axis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
def curvelinear_test2(fig):
2323
"""Polar projection, but in a rectangular box."""
2424
# see demo_curvelinear_grid.py for details
25-
tr = Affine2D().scale(np.pi / 180., 1.) + PolarAxes.PolarTransform()
25+
tr = Affine2D().scale(np.pi / 180., 1.) + PolarAxes.PolarTransform(
26+
_apply_theta_transforms=False)
2627

2728
extreme_finder = angle_helper.ExtremeFinderCycle(20,
2829
20,

galleries/examples/axisartist/simple_axis_pad.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def setup_axes(fig, rect):
2121
"""Polar projection, but in a rectangular box."""
2222

2323
# see demo_curvelinear_grid.py for details
24-
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
24+
tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform(
25+
_apply_theta_transforms=False)
2526

2627
extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
2728
lon_cycle=360,

0 commit comments

Comments
 (0)
0