Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 44ee7f9

Browse filesBrowse files
committed
Merge pull request #4553 from grlee77/axes3D_clear
BUG fix: prevent 2D axis from showing up after calling Axes3D.cla()
2 parents 42f09b6 + 7d11149 commit 44ee7f9
Copy full SHA for 44ee7f9

File tree

Expand file treeCollapse file tree

3 files changed

+10
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-1
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ def cla(self):
963963
self.patch.set_linewidth(0)
964964
self.patch.set_transform(self.transAxes)
965965

966-
self.axison = True
966+
self.set_axis_on()
967967

968968
self.xaxis.set_clip_path(self.patch)
969969
self.yaxis.set_clip_path(self.patch)
Loading

‎lib/mpl_toolkits/tests/test_mplot3d.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/tests/test_mplot3d.py
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@ def test_axes3d_labelpad():
257257
tick.set_pad(tick.get_pad() - i * 5)
258258

259259

260+
@image_comparison(baseline_images=['axes3d_cla'], extensions=['png'])
261+
def test_axes3d_cla():
262+
# fixed in pull request 4553
263+
fig = plt.figure()
264+
ax = fig.add_subplot(1,1,1, projection='3d')
265+
ax.set_axis_off()
266+
ax.cla() # make sure the axis displayed is 3D (not 2D)
267+
268+
260269
if __name__ == '__main__':
261270
import nose
262271
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.