again I have some problem with my macro.
I posted regarding the same macro a memory leack problem some months ago. Now, I have another problem:
Saving my canvas afterwards as a .ps, I always see ontop of my TCanvas in which the different TGraphs should have been drawn in the respective TPad a TGraph drawn. While running the macro this does not occure, as if before saving and afterwards closing the TCanvas the last pointer to a TGRaph is also “saved” by simply drawing it ontop of my TCanvas. Attached you can find two data files and a minimal example of the macro as well as the resulting .ps File.
Your macro is tricky. I am trying to dismantle it to find the faulty bit.
I found that:
g0->DrawClone(“AP”);
is part of the problem. Using Draw() instead of DrawClone() makes it behaving better. But then you get 2 plots instead of one … Why DrawClone() and not simply Draw() ?
Beacuse simply using Draw() erases the TGraph from the respective TPad once the secon iteration of the loop is started. So I have to draw a clone that stays in the pad
One Graph in each pad is hwat I need! But how do I avoid two graphs to be plot without erasing each plot during the next iteration from the previous pad?