connected to the question Plot 2D Numpy Array, I am trying to plot:
tdos = np.transpose(tdos)
# plot
plt.plot(tdos[0], tdos[1])
plt.plot(tdos[0], -1.0*tdos[2]) # here, basically, I need the plot upside down
and this is giving error:
plt.plot(tdos[0], -1*tdos[2])
TypeError: unsupported operand type(s) for *: 'int' and 'numpy.ndarray'
I don't understand why. Though error is clear enough.
The transposed tdos looks like:
[['-3.463' '-3.406' '-3.349' ..., '10.594' '10.651' '10.708']
['0.0000E+00' '0.0000E+00' '-0.2076E-29' ..., '0.2089E+02' '0.1943E+02'
'0.2133E+02']
['0.0000E+00' '0.0000E+00' '-0.3384E-30' ..., '0.3886E+02' '0.3915E+02'
'0.3670E+02']
['0.0000E+00' '0.0000E+00' '-0.1181E-30' ..., '0.9742E+03' '0.9753E+03'
'0.9765E+03']
['0.0000E+00' '0.0000E+00' '-0.1926E-31' ..., '0.9664E+03' '0.9687E+03'
'0.9708E+03']]