'Unable to Plot 3d Function Using Matplotlib
I am trying to plot a 3d function in python using matplotlib. For some reason I get the error "Invalid syntax (pyflakes E)" in the second line of the code provided when trying to plot it. I got this part from another person, and this works for them. The packages from matplotlib I have installed are mplot3d, cm, and Subplot. Perhaps there is another package I need?
fig = plt.figure(figsize=(12,12))
ax = fig.add_subplot(projection='3d')
Solution 1:[1]
It seems that you need to use ax = plt.axes(projection = 3d)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Austin Heard |
