TLatex* latex = new TLatex(); latex->SetTextAlign(22); latex->SetTextSize(0.03); latex->SetNDC(true); latex->DrawLatex(0.5, 0.95, "My Plot Title");
TLatex* latex = new TLatex(); latex->SetTextAlign(31); latex->SetTextSize(0.03); latex->SetNDC(true); latex->DrawLatex(0.9, 0.1, "My Label");In this example, we create a TLatex object with default position and set its position to (x=0.9, y=0.1) using SetNDC. We also set the text alignment to right-bottom (31) and set the text size to 0.03. Both examples use the ROOT package/library.