I hadnt imported cm
from matplotlib import cm
and i needed to import mplot3d like
from mplot3d import Axes3D
instead of from mpl_toolkits.mplot3d import Axes3D
My data was not ranged correctly too (why nothing was showing). Needed to range form -10 to 10, i had left out the minus sign.
How to resolve unknown Python reference to dependency 'mpl_toolkits' in PyCharm?
-
05-07-2023 - |
سؤال
UPDATE:
When i run it without the cmap=cm.hsv
call i get an empty plot
with the error:
.../lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py:1673: RuntimeWarning: invalid value encountered in divide for n in normals])
Unresolved references for mpl_toolkits and cm
(am betting cm is from mpl_toolkits)
I have tried Invalidating Caches & Restarting (as well as manually readding the path to mpl_toolkits)
with no success.
المحلول
لا تنتمي إلى StackOverflow