Hello rooters,
root 5.14/00 gentoo-2.6.18-r6 gcc 4.1.1
I need to modify the values in the y array of a TGraph then have the graph updated on the current canvas. The following code fragment changes y values in a specified range. However, when graph->Update() does not re-scale the axes, so the modified points may be off-scale when the canvas is updated.:
[snip]
Double_t x,y;
for (int i = 0; i < fGraph->GetN(); i++){
fGraph->GetPoint(i, x, y);
if (x >= fRegionMin && x <= fRegionMax){
// cout << "Point 0 x = " << x << " y = " << y << endl; y = y * fJump; fGraph->SetPoint(i, x, y);
fCanvas->Update(); // Y scale not updated
How do I cause the y axis to be re-scaled?
Thanks,
Roger Received on Wed Feb 14 2007 - 19:32:22 CET
This archive was generated by hypermail 2.2.0 : Thu Feb 15 2007 - 11:50:01 CET