Scope problem dividing graphs

Hello,

Does anyone know how to fix this problem ? Both graphs I'm dealing with,

negmu_ptb & posmu_ptb are good as far as I’m aware & draw fine, but
when I try to divide them using the command line interpreter I hit problems.

root [35] negmu_ptb->Divide(posmu_ptb)
Error: Symbol posmu_ptb is not defined in current scope (tmpfile):1:
*** Interpreter error recovered ***

                                                  Regards,
                                                         Kyle.

I assume that what you call a graph is a TH1, TH1F, etc.
It is likely that your two objects are in a file. In this case you should do:

TH1 *negmu_ptb = (TH1*)myfile->Get("negmu_ptb"); TH1 *posmu_ptb = (TH1*)myfile->Get("posmu_ptb); negmu_ptb->Divide(posmu_ptb);
Rene

Thanks !

I gave that a go & it works fine now,

          Cheers,
              Kyle.