Hi, I want to draw a graph on a pad but define the area the graph uses on the pad by myself. I found the function TPad::RangeAxis(). But the graph looks always the same independent of the parameter values of this function or if I don't call this function at all. It is the same situation with the function TPad::Range(); Here is my test macro: { gROOT->Reset(); // Create a new canvas. c1 = new TCanvas("c1","canvas",50,10,600,300); // create a pad pad = new TPad("p1", "pad", 0.05, 0.05, 0.95, 0.95); pad->SetFillColor(3); pad->SetBorderSize(0); pad->RangeAxis(0.2, 0.2, 0.5, 0.8); pad->Range(0.0, 0.0, 40., 40.); pad->Draw(); pad->cd(); // create a graph Float_t x[] = {8., 12.5, 14.9, 25.8, 30.2}; Float_t y[] = {16., 14.3, 20.3, 23.5, 29.9}; graph = new TGraph(5, x, y); graph->Draw("AL"); } If I want to define the Range by pressing the right mouse button on the pad and selecting Range and defining new values (for example X1 = 12.45) nothing happens but two new strange lines appear on the pad. Is it the wrong function I call or do I miss something? Reiner.
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET