Zooming TGraph

As far as I understand, the histogram under the TGraph is TH1. So I can only change X binning. How can it influence zooming Y axis?

When you plot a 2D distribution the axis are hold by a 2D histogram:

root [0] ntuple->Draw("px:py");
root [1] gPad->ls()
Canvas Name=c1 Title=c1 Option=
 TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1 Option=
  OBJ: TList	TList	Doubly linked list : 0
   TFrame  X1= -4.500000 Y1=-4.500000 X2=5.000000 Y2=5.000000
   OBJ: TH2F	htemp	px:py : 1 at: 0x7fbf41703f60
   OBJ: TPaveText	title  	X1= -0.414727 Y1=5.475000 X2=0.914727 Y2=6.128125
   OBJ: TGraph	Graph	Graph : 1 at: 0x7fbf4171d5b0
root [2] 

Great, works! Although making a histogram with 100000 bins feels a little bit strange.

I understand that now it would be a huge change, but wouldn’t it be better for the TGraph drawn from TTree to behave like a standard TGraph (not sure how for standard TGraph the ability to zoom infinitely is achieved)?

Another way would be to use gPad->DrawFrame() and plot the Tree on top with option SAME.