TGraph(Errors)

11 views
Skip to first unread message

Jeroen Hegeman

unread,
Dec 1, 2011, 7:47:48 AM12/1/11
to rootplo...@googlegroups.com
Hi,

Has anyone ever tried a TGraph or a TGraphErrors with rootplot? Right now I'm just converting them to matplotlib by hand (which is pretty straightforward) but a r2m.Graph() would be soooo convenient!

Jeff, the lack of such a thing in rootplot (just curious) is probably a case of never-needed-it-before, right? In that case I will try to find some time to write a real converter and submit it to you.

Cheers,
Jeroen

Jeff Klukas

unread,
Dec 1, 2011, 8:06:10 AM12/1/11
to rootplo...@googlegroups.com
Currently, the r2m.Hist object has a constructor that can handle
either a TH1* or a TGraph*. This works reasonably well for simple
cases, i.e. evenly spaced points along the x-axis. Overall, it's a
rather hacked together solution, but it works for the cases where I
need it, which is solely for TGraphAsymmErrors produced from dividing
two histograms to get an efficiency.

A better solution would be welcome, although if you want to make a
long-term impact, I'd direct your development efforts toward rootpy.

Jeroen Hegeman

unread,
Dec 1, 2011, 8:20:32 AM12/1/11
to rootplo...@googlegroups.com
Ah, never heard of rootpy before. Looks like you merged brains and ideas with someone? I'll have a look into that. It's a very noble cause ;-)

Jeroen

Jeff Klukas

unread,
Dec 1, 2011, 8:24:38 AM12/1/11
to rootplo...@googlegroups.com
On Thu, Dec 1, 2011 at 2:20 PM, Jeroen Hegeman <jeroen....@gmail.com> wrote:
> Ah, never heard of rootpy before. Looks like you merged brains and ideas with someone? I'll have a look into that. It's a very noble cause ;-)

I'm glad we have allies :)

Yes, Noel started first announced rootpy about a year ago and I
quickly came to the conclusion that his approach of wrapping the ROOT
objects was absolutely the way to go, so I've been contributing to
that project with the eventual goal of migrating all of rootplot
there. There just never seems to be the time to make it happen!

// Jeff

Reply all
Reply to author
Forward
0 new messages