25#include "ROOT/RLegend.hxx"
37 for (
int n=0;
n<1000;
n++) {
43 auto canvas = RCanvas::Create(
"RLegend example");
46 canvas->Draw<
RPaletteDrawable>(
RPalette({{0., RColor::kWhite}, {.3, RColor::kRed}, {.7, RColor::kBlue}, {1., RColor::kBlack}}),
false);
50 draw1->line.width = 2.f;
51 draw1->line.color = .3f;
55 draw2->line.width = 4.f;
56 draw2->line.color = .7f;
58 auto legend = canvas->Draw<RLegend>(
"Legend title");
60 legend->fill.style = RAttrFill::k3019;
61 legend->border.color = RColor::kRed;
68 custom->line.color = RColor::kGreen;
70 custom->line.style = RAttrLine::kSolid;
71 custom->fill.color = RColor::kBlue;
72 custom->fill.style = RAttrFill::k3004;
73 custom->marker.color = RColor::kRed;
74 custom->marker.size = 0.03;
75 custom->marker.style = RAttrMarker::kOpenCross;
77 canvas->SetSize(1000, 700);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TRandom * gRandom
Objects used to configure the different axis types.
A color palette draw near the frame.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...