Dears rooters,
I’m having a problem to create a TGraph from pandas dataframe.
This is the part of the code, where I read the data with pandas, I convert the 2 columns in array in order to pass them to the TGraph:
import pandas as pd
df=pd.read_csv(csv_off, sep=’\t’)
n= len(df[‘HV1’])
x= df[‘HV1’].values
y= df[‘EFF1’].values
w= TGraph(n,x,y)
canvas= TCanvas()
w.Draw(“APE”)
canvas.SaveAs(“p.png”)
The error that I got is:
Error in <TGaxis::PaintAxis>: length of axis is 0
I check the data reading and it is ok
thanks in advance