//plotting two functions on the same graph #include using namespace std; void ylim() { TCanvas *c = new TCanvas("c","c"); TF1*f1= new TF1("f1","exp([0]+[1]*x)",0.,20.); f1->SetParameters(1,-1); TF1 *f2 = new TF1("f2","sin(x)/x",0.,20.); f1->GetYaxis()->SetRange(-5,5); f2->GetYaxis()->SetRange(-5,5); f1->Draw(); f2-> Draw("SAME"); }