Hi,
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:
[code]{
gr_date = new TGraph();
gr_date->SetPoint(0, time(0), 1);
gr_date->GetXaxis()->SetTimeDisplay(kTRUE);
c_date = new TCanvas(“c_date”, “c_date”);
gr_date->Draw(“ap”);
gr_nodate = new TGraph();
gr_nodate->GetXaxis()->SetTimeDisplay(kTRUE);
gr_nodate->SetPoint(0, time(0), 2);
c_nodate = new TCanvas(“c_nodate”, “c_nodate”);
gr_nodate->Draw(“ap”);
}[/code]
Is there a more convenient class for my purpose?
Max