I am using this code to draw a graph with errors from a txt file:
TGraphErrors *g = new TGraphErrors("myFile.txt");
g->SetTitle(
"Title;"
"x axis title;"
"y axis title");
g->SetMarkerStyle(21);
g->SetMarkerColor(kRed);
g->Draw("AP"); //"P" is a must to activate the above "SetMarkerStyle"
if (gPad) gPad->SetLogy(0);
g->SetMinimum(0.001);
gPad->SetLogy(1);