save a TLegend on a TFile

From: Pietro Govoni <Pietro.Govoni_at_mib.infn.it>
Date: Wed, 20 Apr 2011 14:49:52 +0200


Dear Rooters,

I am saving a THStack on a TFile, with root 5.27.02 on my mac. When re-opening the TFile, I'd love to draw the THstack AND a legend, but I am stuck, since if I build the TLegend in the code that creates the stack, I don't get errors, but the legend is not saved in the root file (some mistery here?) (*). On the other hand, I have hard times in trying and building the TLegend from the THStack, when I use the command line afterwards, even if when trying and building a dedicated function.

Does anybody have, by chance, a working solution?

Best regards,

pietro

(*) I use TLegend::Write as:

TLegend leg (/*params*/) ;
// fill the legend
leg.Write ("leg") ;

Received on Wed Apr 20 2011 - 14:50:07 CEST

This archive was generated by hypermail 2.2.0 : Wed Apr 20 2011 - 17:50:01 CEST