This ROOT7 example demonstrates how to create a RCanvas and draw several RAxis objects with different options.
{
auto canvas = RCanvas::Create("RAxis examples");
draw0->axis.ticks.SetInvert();
draw0->axis.title =
"vertical";
draw1->axis.title =
"horizontal";
draw1->axis.title.SetCenter();
draw2->axis.ticks.SetBoth();
draw2->axis.title =
"both side ticks";
draw2->axis.title.SetCenter();
draw3->axis.title =
"center labels";
draw3->axis.labels.center =
true;
draw4->axis.SetTimeDisplay(
"%d/%m/%y %H:%M");
draw4->axis.title =
"time display";
draw4->axis.labels.size = 0.01;
draw4->axis.labels.color = RColor::kRed;
std::vector<std::string> labels = {"first", "second", "third", "forth", "fifth"};
draw5->SetLabels(labels);
draw5->axis.ticks.SetInvert();
draw5->axis.title =
"labels, swap ticks side";
draw5->axis.title.SetLeft();
draw6->axis.ending.SetArrow();
draw6->axis.title =
"vertical negative length";
draw7->axis.title =
"log10 scale";
draw7->axis.title.SetCenter();
draw7->axis.title.font = RAttrFont::kVerdana;
draw7->axis.title.color = RColor::kGreen;
draw7->axis.ending.SetCircle();
draw8->axis.title =
"log2 scale";
draw8->axis.title.SetCenter();
draw9->axis.log = 2.7182;
draw9->axis.title =
"ln scale";
draw9->axis.title.SetCenter();
draw10->axis.ending.SetArrow();
draw10->axis.title =
"horizontal negative length";
draw10->axis.title.SetCenter();
draw11->axis.ending.SetArrow();
draw11->axis.title =
"horizontal reverse";
draw11->axis.title.SetCenter();
draw12->axis.ending.SetArrow();
draw12->axis.ticks.color = RColor::kBlue;
draw12->axis.title =
"vertical axis with arrow";
draw12->axis.title.SetCenter();
canvas->SetSize(1000, 800);
canvas->Show();
}
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
A position (horizontal and vertical) in a RPad.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
UInt_t Convert(Bool_t toGMT=kFALSE) const
Convert fDatime from TDatime format to the standard time_t format.