22void exampleTKDE(
int n = 1000) {
34 std::vector<double>
data(
n);
35 for (
int i = 0;
i <
n; ++
i) {
47 h1->Scale(1./
h1->Integral(),
"width" );
49 h1->SetTitle(
"Bi-Gaussian");
53 TF1 *
f1 =
new TF1(
"f1",
"0.4*ROOT::Math::normal_pdf(x,1,2)+0.6*ROOT::Math::normal_pdf(x,1.5,7)",
xmin,
xmax);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
R__EXTERN TRandom * gRandom
1-D histogram with a double per channel (see TH1 documentation)
Kernel Density Estimation class.
TF1 * GetDrawnUpperFunction()
TF1 * GetDrawnLowerFunction()
void Draw(const Option_t *option="") override
Draws either the KDE functions or its errors.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
void Draw(Option_t *option="") override
Draw this legend with its current attributes.