Question #698825 on Yade changed: https://answers.launchpad.net/yade/+question/698825
Rohit John posted a new comment: Hello all, Please use the following code for post-processing Kind regards, Rohit # ------------------------------------------------------------------------------------------------------ python script import json import numpy as np from matplotlib import pyplot as plt import plotly.graph_objects as go import sys, os sys.path.append(".") current_path = os.getcwd() # --------------------------------------------------------------------------- setting the directory os.chdir(current_path) # --------------------------------------------------------------------------- selecting the data files files = os.listdir() files_sel = [] for i in files: if i.find('json') > 0: files_sel.append(i) # --------------------------------------------------------------------------- importing data simulation_results = {} for i in files_sel: with open(i, 'r', encoding="utf-8") as jsonfile: data = json.load(jsonfile) simulation_results[data['ID']] = data for i in list(simulation_results.keys()): wx = simulation_results[i]['data']['wx'] plt.plot(wx) -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp