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

Detailed Description

This macro plays a recorded ROOT session showing how to perform various interactive graphical editing operations.

The initial graphics setup was created using the following root commands:

TRecorder *t = new TRecorder();
t->Start("graphedit_playback.root");
TCanvas *c2 = new TCanvas("c2","c2",0,0,700,500);
TH2F* h2 = new TH2F("h2","Random 2D Gaussian",40,-4,4,40,-4,4);
h2->SetDirectory(0);
for (int i=0;i<50000;i++) h2->Fill(r.Gaus(),r.Gaus());
h2->Draw();
gPad->Update();
TCanvas *c1 = new TCanvas("c1","c1",0,0,700,500);
TH1F* h1 = new TH1F("h1","Random 1D Gaussian",100,-4,4);
h1->SetDirectory(0);
h1->FillRandom("gaus",10000);
h1->Draw();
gPad->Update();
// Here the following "sketch" was done.
t->Stop();

Note: The previous commands should be copy/pasted into a ROOT session, not executed as a macro.

The interactive editing shows

The sketch of the recorded actions is

On the canvas c1

Definition in file graph_edit_playback.C.