I want to set an interval on my x axis (histogram) but when I run my code, this ValueError is raised: "ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"
. It refers to this lign of code: P.xticks(min(x), max(x), 0.01)
Here is the code:
import numpy as np
import pylab as P
P.figure()
x = X
n, bins, patches = P.hist(x, 10, normed=1, histtype='bar',
label=['SPX Index', 'MXEF Index', 'NKY Index', 'SX5E Index', 'UKX Index', 'SMI Index', 'OMX Index'])
P.xticks(min(x), max(x), 0.01)
P.legend(loc='upper right', fontsize=8)
P.show()
FYI, X refers to X = df.ix[:,:].values
type(X)
= numpy.ndarray (n x k matrix)
Thanks for your help!
Firebase Cloud Functions: PubSub, "res.on is not a function"
TypeError: Cannot read properties of undefined (reading 'createMessageComponentCollector')
I want to set an interval on my x axis (histogram) but when I run my code, this ValueError is raised: "ValueError: The truth value of an array with more than one element is ambiguousUse a
I am trying to get exact text that is sent on my gmail but i am also getting someother value also, following is my code
I have following data in different format: