wenn ich folgenden Code ausführe, bekomme ich den Fehler "name 'bar3d' is not defined". Dabei müssten alle nötigen Pakete eingebunden und Installiert seien.
Code: Alles auswählen
import pandas as pd
import numpy as np
from scipy.stats import multivariate_normal
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(color_codes=True)
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax1 = fig.add_subplot(111,projection = '3d')
xpos = [1,2,3,4,5,6,7,8,9,10]
ypos = [2,3,4,5,1,6,2,1,7,2]
zpos = [0,0,0,0,0,0,0,0,0,0]
dx = np.ones(10)
dy = np.ones(10)
dz = [1,2,3,4,5,6,7,8,9,10]
ax1 = bar3d(xpos,ypos,zpos,dx,dy,dz, color = 'red')
plt.show()
Code: Alles auswählen
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-5278d6536204> in <module>
8 dz = [1,2,3,4,5,6,7,8,9,10]
9
---> 10 ax1 = bar3d(xpos,ypos,zpos,dx,dy,dz, color = 'red')
11
12 plt.show()
NameError: name 'bar3d' is not defined