I’m writing a kind of slow control system. For two dimensional plots I
use TGraph and my program calls TGraph::SetPoint when it gets new
events. It works almost fine but I’m looking for a way to get rid of a
problem. Firstly, I noticed that
graph->GetXaxis()->SetTimeDisplay(kTRUE) has no effect due to
TGraph::SetPoint() removes graph’s histogram. Secondly, axis zoom
is discarded with a new event because of the same reason.
A short script to reproduce this behavior:
gr_date = new TGraph();
gr_date->SetPoint(0, time(0), 1);
c_date = new TCanvas(“c_date”, “c_date”);
gr_nodate = new TGraph();
gr_nodate->SetPoint(0, time(0), 2);
c_nodate = new TCanvas(“c_nodate”, “c_nodate”);
Is there a more convenient class for my purpose?