15 TCanvas *
c =
new TCanvas(
"c",
"A Simple Graph Example with Text",700,500);
20 gr->
SetTitle(
"A Simple Graph Example with Text");
22 auto ex =
new TExec(
"ex",
"drawtext();");
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.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
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.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.
TList * GetListOfFunctions() const
void Draw(Option_t *chopt="") override
Draw this graph with its current attributes.
void SetTitle(const char *title="") override
Change (i.e.
To draw Mathematical Formula.
void Add(TObject *obj) override
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
void drawtext(double x, double y, int f, const char *s)
RVec< PromoteType< T > > sin(const RVec< T > &v)