Hello!
I’ve been trying to look through this forum to find a solution to something I completely don’t understand.
I can’t seem to get Marker Color, Style nor Size from a TFile containing TGraph objects using PyROOT while using ROOT works as far as I can see, and I don’t have the faintest idea of why, been trying quite a few different ways so far.
The attached scripts show the situation and the TFile, on line 44 in the filereader.py the list is supposed to hold the same values as the one in filereader.C, but it only has the default values for TGraph objects.
Any help would be greatly appreciated.
empty = []
for key in f.GetListOfKeys():
name = key.GetName()
title = key.GetTitle()
if int(name) in checklist:
graph = f.Get(name)
empty.append(graph.GetMarkerColor())
if setown:
graph.SetMarkerStyle(style)
graph.SetMarkerColor(color)
graph.SetMarkerSize(size)
graph.Draw('p')
tl1.AddEntry(name, title,'p')
print empty
TGraphs.root (24.4 KB)
filereader.py (1.49 KB)
filereader.C (300 Bytes)