33 static constexpr int npoints = 10;
34 double x[npoints] = { 1., 2., 3., 4., 5., 6., 7., 8., 9., 10. };
35 double y[npoints] = { .1, .2, .3, .2, .1, .2, .3, .2, .1, .2 };
38 auto canvas = RCanvas::Create(
"Demo of RCanvas update");
46 canvas->Update(
false, [](
bool res) { std::cout <<
"First sync update done = " << (res ?
"true" :
"false") << std::endl; });
59 canvas->Update(
true, [](
bool res) { std::cout <<
"Second async update done = " << (res ?
"true" :
"false") << std::endl; });
61 std::cout <<
"This message appear normally before second async update" << std::endl;
Provides v7 drawing facilities for TObject types (TGraph, TH1, TH2, etc).
A TGraph is an object made of two arrays X and Y with npoints each.
virtual void SetPoint(Int_t i, Double_t x, Double_t y)
Set x and y values for point number i.