如何在3d图中脱离网格

问题描述 投票:0回答:1

我有一个3D图脚本:

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np

fig = plt.figure(figsize=[5,3])
ax = fig.gca(projection = '3d')
ax.set_ylim(0,3)
ax.set_zlim(0,2)

我读了here那>

ax=gca()
ax[:set_axis_off]()

将有所帮助。如何申请?

我尝试过:

fig = plt.figure(figsize=[5,3])
ax = fig.gca(projection = '3d')
ax[:set_axis_off]()
ax.set_ylim(0,3)
ax.set_zlim(0,2)

有错误:

/usr/lib/python3.6/_collections_abc.py:841: MatplotlibDeprecationWarning: 
The text.latex.unicode rcparam was deprecated in Matplotlib 3.0 and will be removed in 3.2.
  self[key] = other[key]
Traceback (most recent call last):
  File "axes.py", line 16, in <module>
    ax[:set_axis_off]()
NameError: name 'set_axis_off' is not defined

我有一个用于3D绘图的脚本:从mpl_toolkits.mplot3d导入matplotlib.pyplot作为plt导入Axes3D导入numpy作为np图= plt.figure(figsize = [5,3])ax =图gca(projection ='3d ')ax.set_ylim(0,...

python-3.x matplotlib 3d
1个回答
1
投票

example you found,用于Julia编程语言。

© www.soinside.com 2019 - 2024. All rights reserved.