File indexing completed on 2024-04-06 12:01:31
0001 import pandas as pd
0002 import json
0003 import os
0004 import glob
0005
0006 files = glob.glob(os.getcwd()+"/CondCore/CTPPSPlugins/test/results/*.json")
0007 print(os.getcwd())
0008
0009 for file in files:
0010 f = open(file)
0011 data = json.load(f)
0012 df = pd.DataFrame(data['data'])
0013 plot = df.plot.scatter(x='x', y='y', xlabel=data['annotations']['x_label'], ylabel=data['annotations']['y_label'])
0014 plot.get_figure().savefig(file.strip(".json")+".png")