ich möchte gerne mit pyplot einige Daten plotten.
Noch stehen in der zu plottenden Liste nur zwei Werte, die auch schon Probleme machen, hier die Liste:
- ['8.96047e-07,', '8.87331e-07,']
pyplot scheint wohl mit der Darstellung der Zahlen nicht zurechtzukommen.Traceback (most recent call last):
File "simpleFoam_residual_plot.py", line 110, in <module>
plt.plot(x_p,y_p)
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 2141, in plot
ret = ax.plot(*args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 3433, in plot
self.add_line(line)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 1385, in add_line
self._update_line_limits(line)
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 1393, in _update_line_limits
p = line.get_path()
File "/usr/lib/pymodules/python2.7/matplotlib/lines.py", line 651, in get_path
self.recache()
File "/usr/lib/pymodules/python2.7/matplotlib/lines.py", line 439, in recache
y = np.asarray(self.convert_yunits(self._yorig), float)
File "/usr/lib/pymodules/python2.7/numpy/core/numeric.py", line 284, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: invalid literal for float(): 8.96047e-07,
Weiß jemand wie ich die Zahlen umformatieren kann?
Gruß