matplotlib surface example not working
this example: https://matplotlib.org/mpl_examples/mplot3d/surface3d_demo3.py
when run from pythonista, does not plot as in the doc.
It should show
but the result is very different.
Is there any solution?
Hi, most likely it is due to different version of Pythonista matplotlib compared to the version you use in your computer or the version used to produce the image of the example. Pythonista matplotlib version is 1.4.0.
However for 3D graphs (xyz) I would not use Pythonista, for them I'd use other apps (like for example Visual Math 4D, I apologize for mentioning it in this forum).
thanks for the answer.
I’ve just found that this example is in pythonista doc with a small change (the commented line is replaced by the next one)
#surf = ax.plot_surface(X, Y, Z, facecolors=colors, linewidth=0) surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors, linewidth=0, antialiased=False)
then it works!
@jmv38 Very good and good to know, bye