我有一个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