How to set TGrid

hello

I’m using Tgraph and I would like to set the proper grid

TGraph *gr7 = new TGraph(“fullscan.dat”); TCanvas full = new TCanvas(“full”);
full->SetGrid();
gr7->SetLineColor(4);
full->SetGrid();
gr7->Draw("A
");
gr7->GetYaxis()->SetTitle(“180-#theta”);
gr7->GetXaxis()->SetTitle("#phi");
gr7->GetYaxis()->SetRangeUser(0.,180.);
gr7->GetXaxis()->SetRangeUser(0.,360.);

I would like for it to start at 10 30 50,…
instead of 0 20 40,… on the y axis

and the would like it to start at 0,20,…
instead of 50, 100,… pm x axis

help would be great

The grid is drawn on the primary divisions of the axis. Modify the number of divisions and you will modify the grid.