I am having .csv file which contains two columns one of which is the date as dd/mm/yy form and other the y axis value.
I need to draw the graph between both of these columns with date in x axis and the other one in y axis.
I have done it earlier for .dat and .txt file but with .csv its not working. code is like :-
{TNtuple calls("calls","calls","time:cloud water path ice mean");
calls.ReadFile("g4.areaAvgTimeSeries.MOD08_D3_6_Cloud_Water_Path_Ice_Mean.20010101-20010131.180W_90S_180E_90N.csv");
TCanvas *a1 = new TCanvas("a1","canvas");
calls.Draw("cloud water path ice mean:time");
htemp->SetTitle("water path ice mean ; time ; % deviation");
htemp->GetXaxis()->CenterTitle();
htemp->GetYaxis()->CenterTitle();
gStyle->SetTitleFontSize(0.06);
htemp->GetXaxis()->SetTitleSize(0.05);
htemp->GetYaxis()->SetTitleSize(0.05);
a1->SetFillColor(42);
Graph->SetMarkerStyle(7);
Graph->SetMarkerColor(4);
}
Now,can anyone help me out in this please?
the file contains some description in the first few rows and columns and then after that it starts with the data column wise.
It replaces everything that looks like a date in format dd/mm/yy with the epoch (assumes you are in date 2000+yy). Later in ROOT, you can format the axis using SetTimeDisplay / SetTimeFormat.
There are probably a lot of other solutions as well.
Ok,so that seems to take care for the time part but,i am not able to read the csv file only now as before the plotting i need to make that read.
I am still looking for the solution on how to make that read it.