#include "Ramo.h" void plot_RamoPotential() { TCanvas *c1 = new TCanvas("c1","A Simple Graph with error bars",0,0,700,500); TH2F *hE2 = new TH2F("hE2","Electric field2;X [#mum];Y [#mum];Ramo potential [V]",200.,-200.,200.,285,0., 285.); initialize(); for (double x=-199.; x<200.; x+=2.){ for (double y=0.; y<=285.; y+=1.){ double P=induced(0,x/10000.,y/10000.); // cout<<" "<Fill(x, y, P); } } hE2->SetOption("surf4"); hE2->Draw(); c1->Print("Ramo_potential.png"); }