This ROOT 7 example shows how to create a frame.
#include "ROOT/RFrameTitle.hxx"
#include "ROOT/RLine.hxx"
#include "ROOT/RText.hxx"
#include "ROOT/RBox.hxx"
auto rframe_style = RStyle::Parse(
"frame { x_ticks_width: 3; y_ticks_width: 3; }"
"title { margin: 0.02; height: 0.1; text_color: blue; text_size: 0.07; }"
"line { line_width: 2; }"
"text { text_align: 13; text_size: 0.03; }");
{
auto canvas = RCanvas::Create("RFrame with drawAxes enabled");
auto frame = canvas->AddFrame();
frame->border.color = RColor::kBlue;
frame->border.width = 3;
frame->drawAxes = true;
frame->x.min = 0;
frame->x.max = 100;
frame->x.zoomMin = 5.;
frame->x.zoomMax = 95.;
frame->x.line.color = RColor::kGreen;
frame->y.min = 0;
frame->y.max = 100;
frame->y.zoomMin = 5;
frame->y.zoomMax = 95;
frame->y.line.color = RColor::kBlue;
text0->text.align = RAttrText::kLeftBottom;
line2->onFrame = true;
line2->line.color = RColor::kRed;
text2->text.align = RAttrText::kLeftBottom;
line3->line.color = RColor::kRed;
box4->fill.color = RColor::kBlue;
box4->fill.style = RAttrFill::kSolid;
box5->fill.color = RColor::kYellow;
box5->fill.style = RAttrFill::kSolid;
text5->text.align = RAttrText::kLeftBottom;
canvas->Show();
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
A position (horizontal and vertical) in a RPad.
- Date
- 2020-02-20
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Definition in file rframe.cxx.