Logo ROOT  
Reference Guide
markerStyle.cxx File Reference

Detailed Description

#include "ROOT/RCanvas.hxx"
#include "ROOT/RText.hxx"
#include "ROOT/RMarker.hxx"
#include <string>
void markerStyle()
{
using namespace ROOT::Experimental;
auto canvas = RCanvas::Create("Canvas Title");
double num = 0.3;
double x = 0;
double dx = 1/16.0;
for (int i=1;i<16;i++) {
x += dx;
for (int row=0;row<3;++row) {
int style = i;
if (row==1) style+=19; else if (row==2) style+=34;
RPadPos pt(RPadLength::Normal(x), .12_normal + 0.3_normal*row);
canvas->Draw<RText>(pt, std::to_string(style));
RPadPos pm(RPadLength::Normal(x), .25_normal + 0.3_normal*row);
canvas->Draw<RMarker>(pm)->AttrMarker().SetStyle(style).SetSize(2.5);
}
}
canvas->Show();
}
Date
2018-03-18
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
Author
Iliana Betsou

Definition in file markerStyle.cxx.

x
Double_t x[n]
Definition: legend1.C:17
ROOT::Experimental::RCanvas::Create
static std::shared_ptr< RCanvas > Create(const std::string &title)
Create new canvas instance.
Definition: RCanvas.cxx:70
RCanvas.hxx
TCanvas::Draw
virtual void Draw(Option_t *option="")
Draw a canvas.
Definition: TCanvas.cxx:841
style
TCanvas * style()
Definition: style.C:1
TCanvas::Show
void Show()
Show canvas.
Definition: TCanvas.cxx:2236
ROOT::Experimental::RPadLength::Normal
A normalized coordinate.
Definition: RPadLength.hxx:100
ROOT::Experimental
Definition: RDirectory.hxx:36
pt
TPaveText * pt
Definition: entrylist_figure1.C:7
ROOT::Experimental::RPadPos
A position (horizontal and vertical) in a RPad.
Definition: RPadPos.hxx:40