15 TCanvas *
c =
new TCanvas(
"c",
"A Simple Graph Example with Text",700,500);
20 gr->SetTitle(
"A Simple Graph Example with Text");
21 gr->SetMarkerStyle(20);
22 auto ex =
new TExec(
"ex",
"drawtext();");
23 gr->GetListOfFunctions()->Add(
ex);
46 auto g = (
TGraph*)
gPad->GetListOfPrimitives()->FindObject(
"Graph");
51 l.PaintText(
x,
y+0.2,
Form(
"(%4.2f,%4.2f)",
x,
y));
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
TExec is a utility class that can be used to execute a C++ command when some event happens in a pad.
A TGraph is an object made of two arrays X and Y with npoints each.
To draw Mathematical Formula.
void drawtext(double x, double y, int f, const char *s)
RVec< PromoteType< T > > sin(const RVec< T > &v)