matplotlib - 3D surface plot , " float() argument must be a string or a number " in python -


i'm trying plot surface plot following x, y , z axis:

my x value, "excess_calc" :

{'2012-04-03': array([ 74.918567  ,  74.5223076 ,  84.45777874)]   '2012-04;04': array([78.03464433,  81.65472595,  85.00621476,   87.1444176]) ...} 

y value, "spread_calc" :

{0: array([ 1.84499667,  1.87126911,  1.8720464 ,  1.87548384)] 1: array([1.89338594,  1.88059231,  1.87021495,  1.872181080)] ... } 

and z value, "equi":

[float(num) num, date in equi_locs] 

which list of numbers, [1, 2 , 3, 4 .. etc way 242) , 242 len of keys in both dicts above.

when :

 mpl_toolkits.mplot3d import axes3d  fig = plt.figure()  ax = fig.add_subplot(111, projection='3d')   ax.plot_surface(spread_calc,             [float(num) num, date in equi_locs],            excess_calc) 

i keep getting error "typeerror: float() argument must string or number"


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -