In Python
, I have values given by 0.000001,0.00001,0.0001,....,1.0
stored in my_Array
(np.array
).
For each of these values I need to label a curve in a plot and store it in the legend as val = 10e-6
instead of val = 0.000001
.
The second version is automatically stored if I use (for the i
'th value):
matplolib.pyplot.plot(...., label = 'val = ' + str(my_Array[i]))
Is there a function converting the float notation to the scientific power of 10 notation?