void g3()
{
Int_t n = 20;
Double_t x[n], y[n], x1[n], y1[n];
for (Int_t i=0; i<n; i++)
{
x[i] = i*0.1;
y[i] = 10*sin(x[i]+0.2);
}
for (Int_t j=0; j<n; j++)
{
x1[j] = j*0.1;
y1[j] = cos(x[j]);
}
TCanvas *c1 = new TCanvas ("c1","Graph Draw Options", 200,10,600,400);
TGraph *gr3 = new TGraph(n,x,y);
gr3-> SetLineColor(4);
gr3->Draw("AC*");
TGraph *gr2 = new TGraph(n,x1,y1);
gr2->SetLineWidth(3);
gr2->SetMarkerStyle(21);
gr2->SetLineColor(2);
gr2->Draw("CP");
}
I wrote this code to superimpose two graphs but it wont work and only shows one graph?