-
Notifications
You must be signed in to change notification settings - Fork 0
/
legend1.c
35 lines (32 loc) · 1.04 KB
/
legend1.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
//========= Macro generated from object: TPave/Legend of markers/lines/boxes to represent obj's
//========= by ROOT version6.30/01
TLegend *leg = new TLegend(0.663317,0.662876,0.864322,0.863545,NULL,"brNDC");
leg->SetBorderSize(1);
leg->SetLineColor(1);
leg->SetLineStyle(1);
leg->SetLineWidth(1);
leg->SetFillColor(0);
leg->SetFillStyle(1001);
TLegendEntry *entry=leg->AddEntry("h1","data set1","l");
Int_t ci; // for color index setting
TColor *color; // for color definition with alpha
ci = TColor::GetColor("#000099");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(42);
entry=leg->AddEntry("h2","data set2","l");
ci = TColor::GetColor("#000099");
entry->SetLineColor(ci);
entry->SetLineStyle(1);
entry->SetLineWidth(1);
entry->SetMarkerColor(1);
entry->SetMarkerStyle(21);
entry->SetMarkerSize(1);
entry->SetTextFont(42);
leg->Draw();
}