void hist2image()
{
TCanvas *canv =
new TCanvas(
"image",
"xygaus + xygaus(5) + xylandau(10)");
TF2 *f2 =
new TF2(
"f2",
"(xygaus + xygaus(5) + xylandau(10))",-4,4,-4,4);
Double_t params[] = {130,-1.4,1.8,1.5,1, 150,2,0.5,-2,0.5, 3600,-2,0.7,-3,0.3};
TH2D *h2 =
new TH2D(
"h2",
"xygaus + xygaus(5) + xylandau(10)",100,-4,4,100,-4,4);
h2->FillRandom("f2",40000);
}
R__EXTERN TImagePalette * gHistImagePalette
virtual void StartPaletteEditor()
Opens a GUI to edit the color palette.
virtual void SetBottomMargin(Float_t bottommargin)
Set Pad bottom margin in fraction of the pad height.
virtual void SetLeftMargin(Float_t leftmargin)
Set Pad left margin in fraction of the pad width.
virtual void SetRightMargin(Float_t rightmargin)
Set Pad right margin in fraction of the pad width.
virtual void SetTopMargin(Float_t topmargin)
Set Pad top margin in fraction of the pad height.
virtual void ToggleEventStatus()
Toggle event statusbar.
virtual void SetParameters(const Double_t *params)
A 2-Dim function with parameters.
2-D histogram with a double per channel (see TH1 documentation)
An abstract interface to image processing library.
static TImage * Create()
Create an image.
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=nullptr)
virtual void Draw(Option_t *option="")
Default Draw method for all objects.