TGraph *g = …; // a “valid” graph
g->Draw(“ALP”); // draws fine
TF2 *f = new TF2(“f”, “10000 - y”);
g->Appy(f); // modifies graph
g->Draw(“ALP”); // this does NOT display the modified graph as expected (by me, of course)

Seems I miss “g->Modified()” somewhere.

Can you send a script we can run, so it will save the time of making one ?

Execute the following set of commands on the ROOT prompt (use copy&paste from here):

Double_t x[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
Double_t y[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
TGraph *g = new TGraph(10, x, y);
g->Draw(“ALP”); // correctly draws the graph with both X and Y axes ranges from 0 to 9
TF2 *f = new TF2(“f”, “10000 - y”);
g->Draw(“ALP”); // draws “empty” canvas with both X and Y axes ranges from 0 to 9, no points displayed

ROOT 5.28/00b, Ubuntu 10.04.2 LTS, i686, gcc 4.4.3

yes, I agree, it is weird.
I am looking

This is now fixed in the SVN trunk.
Thanks for reporting.

v5-28-00-patches, please.

I can do that, but is it really blocking for you ? It is so easy to bypass…
You cannot wait the next release ?

In general, I’ve found that I can:
TGraph *gg = new TGraph(*g); gg->Draw(“ALP”);
But it’s a bit annoying. If you know any simpler trick, let me know.
I do plan to stay with v5-28-patches for a longer time (even when a new release is present).

I applied the fix in the patch release to.

great, thanks.