I have a question: How can I create arrows on axes xyz on 3D graphics?
I using pylib: matplotlib for drawing.Moreover, I tried making a couple of arrows on graphic but I had common sticks in the result. Image:
[Graphic what I get][1]
Here is my code:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from itertools import product, combinations
fig = plt.figure()
ax = Axes3D(fig)
ax.set_xlabel('Вісь x')
ax.set_ylabel('Вісь y')
ax.set_zlabel('Вісь z')
ax.set_aspect('auto')
ax.set_autoscale_on(True)
u = np.arange(-2, 2, 0.1)
x, y = np.meshgrid(u, u)
z = x * y
ax.plot([0, 0], [0, 0], [0, 3], color="blue",)
ax.plot([0, 3], [0, 0], [0, 0], color="green",)
ax.plot([0, 0], [0, 3], [0, 0], color="magenta",)
ax.plot_surface(x, y, z, cmap="plasma", edgecolor="red")
plt.show()