Show only text of TPaveText

Consider this example:

  TCanvas * c = new TCanvas;
  TH1 * h = new TH1F("h", "h", 5, 0.0, 5.0);
  h -> Draw();
  TPaveText * pt = new TPaveText(0.1, 0.1, 2.8, 0.3);
  pt -> AddText("text");
  pt -> SetLineWidth(0.0);
  pt -> Draw();

The output is:

How can I remove all sorts of shadows and fills from the TPaveText displaying only the text?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Use TLatex instead.

1 Like

You can call pt->SetBorderSize(0);.
Please see documentation of TPave class

With pt->SetBorderSize(0); I can remove the border, but how can I also remove the fill (make TPaveText transparent)?

You can try pt->SetFillStyle(0)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.