#include <iostream>
void draw_v6()
{
static constexpr int npoints = 4;
double x[npoints] = {0., 1., 2., 3.};
double y[npoints] = {.1, .2, .3, .4};
auto gr = std::make_shared<TGraph>(npoints,
x,
y);
canvas->Draw(gr, "AL");
canvas->Show();
canvas->Update(false,
[](bool res) { std::cout << "First Update done = " << (res ? "true" : "false") << std::endl; });
canvas->Update(false,
[](bool res) { std::cout << "Second Update done = " << (res ? "true" : "false") << std::endl; });
canvas->SaveAs("draw.png", true,
[](bool res) { std::cout << "Producing PNG done res = " << (res ? "true" : "false") << std::endl; });
canvas->SaveAs("draw.svg");
}
- Date
- 2017-06-02
- Warning
- This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
- Author
- Axel Naumann axel@.nosp@m.cern.nosp@m..ch
Definition in file draw_v6.cxx.