how to extract out file and plot with matplotlib
Hi all,
I have some issue to plot out file with matplotlib. Here is the code i've used.
outfile=tk.askopenfilename(title="Select a .out file",filetypes=(("PSS/E outfile","*.out"),("all files","*.*")))
### Run dyntools to extract the data###
chnfobj = dyntools.CHNF(outfile)
short_title, chanid_dict, chandata_dict = chnfobj.get_data()
### Extract time as a variable###
time = chandata_dict ['time']
f = chandata_dict['freq']
Here is the error
Traceback (most recent call last):
File "C:\Users\dyntoolstest.py", line 34, in <module>
f = chandata_dict['freq']
KeyError: 'freq'
What should i put in [] of f ?
Thank you in advance.
add a comment