ROOT
v6-38
Reference Guide
Loading...
Searching...
No Matches
formula1.C File Reference
Tutorials
»
Visualisation tutorials
»
Graphics tutorials
Detailed Description
Display interpreted functions.
void
formula1()
{
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"Example with Formula"
, 200, 10, 700, 500);
//
// We create a formula object and compute the value of this formula
// for two different values of the x variable.
//
auto
form1
=
new
TFormula
(
"form1"
,
"sqrt(abs(x))"
);
form1
->Eval(2);
form1
->Eval(-45);
//
// Create a one dimensional function and draw it
//
auto
fun1
=
new
TF1
(
"fun1"
,
"abs(sin(x)/x)"
, 0, 10);
c1
->SetGridx();
c1
->SetGridy();
fun1
->Draw();
c1
->Update();
}
ROOT::Detail::TRangeCast
Definition
TCollection.h:312
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TF1
1-Dim function class
Definition
TF1.h:182
TFormula
The Formula class.
Definition
TFormula.h:89
c1
return c1
Definition
legend1.C:41
formula1
Definition
formula1.py:1
Author
Rene Brun
Definition in file
formula1.C
.
tutorials
visualisation
graphics
formula1.C
ROOT v6-38 - Reference Guide Generated on Thu Jan 8 2026 15:00:50 (GVA Time) using Doxygen 1.10.0