0

Не строится трехмерный, при этом использую массивы из библиотеки numpy, и двухмерный график нормально строится

if __name__ == '__main__':
    alist = np.array([0.5, 1, 1.5, 2])
    ylist = []
    xlist = []
    for a in alist:
        for x in range(0, 85, 5):
            x = x / 100
            xlist.append(x)
            ylist.append(func(x, a))

plt.plot(xlist, ylist)
plt.show()

fig = plt.figure()
ax = plt.axes(projection='3d')
plt.show()
ax.set_title("График")

x = xlist
y = ylist
z = alist

ax.plot3D(x, y, z, 'red')

plt.show()
1

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Посмотрите другие вопросы с метками или задайте свой вопрос.