Do legend.SetFillStyle(0);
And it will work as you expect.
But any way that should be fixed, it should work the same way In batch and in interactive mode.
-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch] On Behalf Of Marc Escalier
Sent: Sunday, March 13, 2011 11:05 PM
To: roottalk_at_lxroot01.cern.ch
Subject: [ROOT] TLegend : strange line appears in the saved .gif
Hello,
i tried to make a TLegend's box to be invisible with the macro below.
While indeed, on the screen when launching the macro, the legend has not a box as contour, in the saved .gif file, there is.
Would there be a way to make this "box" to disappear in the saved .gif ?
(attached file)
i mean my goal would be to make the big contour line around the
legend+"The explanation" to disappear
thanks
{//used root 5.27/06
gROOT->SetStyle("Plain");
gStyle->SetPalette(1);
TCanvas *c1=new TCanvas("c1", "A canvas", 10,0, 800, 600); c1->SetLogy();
histo_dummy=c1->DrawFrame(0,1e-4,27,10);
TF1 expontential("expontential","exp(-x)",0,14); expontential.Draw("same");
TLegend legend(0.3,0.45,0.8,0.75);
legend.SetBorderSize(0); legend.SetFillColor(kWhite); legend.SetFillStyle(1); legend.AddEntry("expontential","the explanation","f"); legend.Draw();
c1->SaveAs("test.gif");
}
Received on Mon Mar 14 2011 - 14:39:46 CET
This archive was generated by hypermail 2.2.0 : Mon Mar 14 2011 - 17:50:01 CET