Skip to content

Commit 110c774

Browse files
authored
Remove nonfunctional Axes3D.set_frame_on and get_frame_on methods. (matplotlib#25648)
1 parent 63c97a2 commit 110c774

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``Axes3D.set_frame_on`` and ``Axes3D.get_frame_on`` removed
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
``Axes3D.set_frame_on`` is documented as "Set whether the 3D axes panels are
5+
drawn.". However, it has no effect on 3D axes and is being removed in
6+
favor of ``Axes3D.set_axis_on`` and ``Axes3D.set_axis_off``.

doc/api/toolkits/mplot3d/axes3d.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ Appearance
7777
set_axis_off
7878
set_axis_on
7979
grid
80-
get_frame_on
81-
set_frame_on
8280

8381

8482
Axis

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,20 +1319,10 @@ def get_zlabel(self):
13191319

13201320
# Axes rectangle characteristics
13211321

1322-
def get_frame_on(self):
1323-
"""Get whether the 3D axes panels are drawn."""
1324-
return self._frameon
1325-
1326-
def set_frame_on(self, b):
1327-
"""
1328-
Set whether the 3D axes panels are drawn.
1329-
1330-
Parameters
1331-
----------
1332-
b : bool
1333-
"""
1334-
self._frameon = bool(b)
1335-
self.stale = True
1322+
# The frame_on methods are not available for 3D axes.
1323+
# Python will raise a TypeError if they are called.
1324+
get_frame_on = None
1325+
set_frame_on = None
13361326

13371327
def grid(self, visible=True, **kwargs):
13381328
"""

0 commit comments

Comments
 (0)