Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
pad2png.C File Reference

Detailed Description

View in nbviewer Open in SWAN
Create a canvas and save as png.

void pad2png()
{
TCanvas *c = new TCanvas;
TH1F *h = new TH1F("gaus", "gaus", 100, -5, 5);
h->FillRandom("gaus", 10000);
h->Draw();
img->FromPad(c);
img->WriteImage("canvas.png");
}
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TSystem * gSystem
Definition TSystem.h:572
The Canvas class.
Definition TCanvas.h:23
1-D histogram with a float per channel (see TH1 documentation)
Definition TH1.h:622
An abstract interface to image processing library.
Definition TImage.h:29
static TImage * Create()
Create an image.
Definition TImage.cxx:35
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition TSystem.cxx:416
Author
Valeriy Onuchin

Definition in file pad2png.C.