{
// Macro to generate a plot of current vs voltage.
TGraphErrors* g = new TGraphErrors("ohmsLaw.dat");

// Label the graph.
g->SetTitle("Current vs Voltage");
g->GetHistogram()->SetXTitle("Voltage (V)");
g->GetHistogram()->SetYTitle("Current (mA)");

// Draw the graph with axes and points
g->Draw("AP");

// Save the picture.
gPad->Print("ohmsLaw.png");
}
