30 auto canvas = RCanvas::Create(
"RAxis examples");
32 auto x1 = 0.08_normal, w1 = 0.36_normal,
x2 = 0.57_normal, w2 = 0.36_normal;
36 draw0->axis.ticks.size = 0.02_normal;
37 draw0->axis.title =
"vertical";
45 draw2->axis.ticks.size = 0.02_normal;
46 draw2->axis.title =
"both side ticks";
47 draw2->axis.title.SetCenter();
51 draw3->axis.labels.center =
true;
56 draw4->axis.SetTimeDisplay(
"%d/%m/%y %H:%M");
57 draw4->axis.title =
"time display";
58 draw4->axis.labels.size = 0.01;
59 draw4->axis.labels.color = RColor::kRed;
61 std::vector<std::string> labels = {
"first",
"second",
"third",
"forth",
"fifth"};
65 draw5->axis.title =
"labels, swap ticks side";
66 draw5->axis.title.SetLeft();
71 draw6->axis.ending.SetArrow();
72 draw6->axis.title =
"vertical negative length";
76 draw7->axis.max = 100;
78 draw7->axis.title =
"log10 scale";
79 draw7->axis.title.SetCenter();
80 draw7->axis.title.font = RAttrFont::kVerdana;
81 draw7->axis.title.color = RColor::kGreen;
82 draw7->axis.ending.SetCircle();
86 draw8->axis.max = 128;
88 draw8->axis.title =
"log2 scale";
89 draw8->axis.title.SetCenter();
93 draw9->axis.max = 100;
94 draw9->axis.log = 2.7182;
95 draw9->axis.title =
"ln scale";
96 draw9->axis.title.SetCenter();
100 draw10->axis.title =
"horizontal negative length";
101 draw10->axis.title.SetCenter();
105 draw11->axis.reverse =
true;
106 draw11->axis.title =
"horizontal reverse";
107 draw11->axis.title.SetCenter();
111 draw12->axis.ending.size = 0.01_normal;
112 draw12->axis.ticks.SetBoth();
113 draw12->axis.ticks.color = RColor::kBlue;
114 draw12->axis.ticks.size = 0.01_normal;
115 draw12->axis.title =
"vertical axis with arrow";
116 draw12->axis.title.SetCenter();
118 canvas->SetSize(1000, 800);
#define R__LOAD_LIBRARY(LIBRARY)
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
RAttrAxisTicks ticks
! ticks attributes
RAttrAxisTitle title
! title attributes
RAttrLineEnding ending
! ending attributes
RAttrValue< double > min
! axis min
RAttrAxis axis
! axis attributes
RAxisDrawable & SetLabels(const std::vector< std::string > &lbls)
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.