如何在python的3d图中设置轴的线宽?

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

如何在python的3d图中设置轴的线宽? mpl.rcParams是否可以实现?代码:

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

mpl.rcParams['legend.fontsize'] = 10

fig = plt.figure()
ax = fig.gca(projection='3d')
theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
z = np.linspace(-2, 2, 100)
r = z**2 + 1
x = r * np.sin(theta)
y = r * np.cos(theta)
ax.plot(x, y, z, label='parametric curve')
ax.legend()

plt.show()
python-3.x 3d axis
1个回答
0
投票

尝试一下:

ax.plot_surface(X, Y, Z, linewidth=1)
© www.soinside.com 2019 - 2024. All rights reserved.