Logo ROOT   6.14/05
Reference Guide
pad2png.C File Reference

Detailed Description

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

pict1_pad2png.C.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");
}
Author
Valeriy Onuchin

Definition in file pad2png.C.