I am trying to write latex on canvas and set the text size and color. But SetTextSize() and SetTextColor() is not working.
TCanvas *c = new TCanvas("c", "c", 800, 650);
TLatex *tex = new TLatex();
tex->DrawLatex(0.2, 0.2, "test");
tex->SetTextSizePixels(20); // there is no effect of this line
tex->SetTextColor(2); // there is no effect of this line
Is there any other way to do this? I am using root 5.22.