{ // Dedomena Tash-Revma kai peiramatika sfalmata double V[12]={1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0}; double I[12]={1.0, 2.0, 2.9, 4.0, 4.9, 5.9, 7.0, 8.0, 8.9, 10.0, 10.9, 11.9}; double sfalma_V[12]={0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3}; double sfalma_I[12]={0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2}; TGraphErrors *gr=new TGraphErrors(12, V, I, sfalma_V, sfalma_I); // Orisnos toy grafimatos c1=new TCanvas("c1","Grafima", 1000, 800) ; c1->SetFillColor(42) ; c1->SetGrid() ; gr->SetTitle("Ohm's Law"); //Titlos graflmatos gr->GetXaxis()->SetTitle("V [Volts]"); //Monades ston x axona gr->GetYaxis()->SetTitle("I [mAmps]"); //Monades ston y axona gr->SetMarkerStyle(21) ; gr->SetMarkerSize(0.7) ; gr->SetMarkerColor(2) ; gr->SetLineColor(2) ; gr->Draw("AP"); // Sxediasnos grafimatos }