Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
markerStyle.cxx
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_v7
3///
4/// \macro_code
5///
6/// \date 2018-03-18
7/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
8/// is welcome!
9/// \author Iliana Betsou
10
11#include "ROOT/RCanvas.hxx"
12#include "ROOT/RText.hxx"
13#include "ROOT/RMarker.hxx"
14#include <string>
15
16void markerStyle()
17{
18 using namespace ROOT::Experimental;
19
20 auto canvas = RCanvas::Create("Canvas Title");
21 double num = 0.3;
22
23 double x = 0;
24 double dx = 1/16.0;
25 for (int i=1;i<16;i++) {
26 x += dx;
27 for (int row=0;row<3;++row) {
28 int style = i;
29
30 if (row==1) style+=19; else if (row==2) style+=34;
31
32 RPadPos pt(RPadLength::Normal(x), .12_normal + 0.3_normal*row);
33 canvas->Draw<RText>(pt, std::to_string(style));
34
35 RPadPos pm(RPadLength::Normal(x), .25_normal + 0.3_normal*row);
36 canvas->Draw<RMarker>(pm)->AttrMarker().SetStyle(style).SetSize(2.5);
37 }
38 }
39
40 canvas->Show();
41}
A position (horizontal and vertical) in a RPad.
Definition RPadPos.hxx:28
TPaveText * pt
Double_t x[n]
Definition legend1.C:17
TCanvas * style()
Definition style.C:1