TGraph Xaxis different tick length at different range

Dear Root Developers,
I have a list of point drawn in TGraph and want to have different tick length for different range so that I can see the points clearly.

{
	Double_t x[]={-1200,-1000,-500,-100,-10,-1,-0.05,-0.04,-0.03,-0.02,-0.01,0,0.002,0.004,0.006,0.008,0.01,0.015,0.02,0.025,0.03,1000};
	Double_t y[]={3414.4,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3393.39,3397.44,3437.93,3609.66,3366.43,360.5,180};
	TGraph* gr=new TGraph();
	int i;
	for ( i = 0; i < 22; ++i ) {
		gr->SetPoint(i,x[i],y[i]);
	}
	gr->SetMarkerStyle(28);
	gr->Draw("AP");
}

Like the code, I want the tick length from -1200 to -1 is 200.
-1 to 0.03 , length is 0.01

0.03 length is 500.

Could you tell me how to do it?

Thanks a lot.

You should redraw a graphics axis (TGaxis) on top of the range you want to highlight with longer ticks.

{
   Double_t x[]={-1200,-1000,-500,-100,-10,-1,-0.05,-0.04,-0.03,-0.02,-0.01,0,0.002,0.004,0.006,0.008,0.01,0.015,0.02,0.025,0.03,1000};
   Double_t y[]={3414.4,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3394.48,3393.39,3397.44,3437.93,3609.66,3366.43,360.5,180};
   TGraph* gr=new TGraph();
   int i;
   for ( i = 0; i < 22; ++i ) {
      gr->SetPoint(i,x[i],y[i]);
   }
   gr->SetMarkerStyle(28);
   gr->Draw("AP");
   TGaxis *axis = new TGaxis(0,0,1000,0,0,1000,502,"S");
   axis->SetName("axis");
   axis->SetTickSize(0.5);
   axis->Draw("");
}

Thanks for reply.

I may not make my question clear.
What I want is zooming in the range -1 to 0.03 and zooming out (<-1 or >0.03) .

Your code can redraw the axis but what about the data?

thanks

Ok that’s something else… no way to do that easily… have you tried the log scale ?