Skip to content

Commit 81324aa

Browse files
committed
Avoid deprecation warning in wcsaxes doc
- Temporary fix to matplotlib/matplotlib#19839, - from astropy#11118, - closes (?) astropy#11464 Co-authored-by: @pllim Signed-off-by: Nathaniel Starkman (@nstarman) <[email protected]>
1 parent ab90aa4 commit 81324aa

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎astropy/visualization/wcsaxes/patches.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@
1111

1212
__all__ = ['Quadrangle', 'SphericalCircle']
1313

14+
# monkey-patch the docs to fix CapStyle and JoinStyle subs.
15+
# TODO! delete when upstream fix matplotlib/matplotlib#19839
16+
Polygon.__init__.__doc__ = Polygon.__init__.__doc__.replace(
17+
"`.CapStyle`", "``matplotlib._enums.CapStyle``")
18+
Polygon.__init__.__doc__ = Polygon.__init__.__doc__.replace(
19+
"`.JoinStyle`", "``matplotlib._enums.JoinStyle``")
20+
Polygon.set_capstyle.__doc__ = Polygon.set_capstyle.__doc__.replace(
21+
"`.CapStyle`", "``matplotlib._enums.CapStyle``")
22+
Polygon.set_joinstyle.__doc__ = Polygon.set_joinstyle.__doc__.replace(
23+
"`.JoinStyle`", "``matplotlib._enums.JoinStyle``")
24+
1425

1526
def _rotate_polygon(lon, lat, lon0, lat0):
1627
"""

0 commit comments

Comments
 (0)