This is embarrassing, but I am unable to plot this:
import numpy as np
import matplotlib.pyplot as plt
datf=np.loadtxt(filename, dtype=float,delimiter=" ")
print((datf))
plt.plot(datf[:0], datf[:1])
plt.show()
This is datf:
[[ 1. 19.778986 ]
[ 1.3625678 -1.9363698]
[ 1.4142136 6.5144132]
[ 1.6901453 3.8092139]
[ 2. -4.0222051]]
And the error is:
ValueError: x and y must have same first dimension