Skip to content
Snippets Groups Projects
Commit ed1c9237 authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

Friday's Changes during test of double gate software

parent 4748b7a8
No related branches found
No related tags found
No related merge requests found
...@@ -164,6 +164,7 @@ def calculate_line(VTG,VBG): ...@@ -164,6 +164,7 @@ def calculate_line(VTG,VBG):
# replot results # replot results
def replot_results(replot_dict,df,points,title): def replot_results(replot_dict,df,points,title):
try:
if len(df.columns.tolist())!=0 and replot_dict['check'].value==True: # Measurement is done if len(df.columns.tolist())!=0 and replot_dict['check'].value==True: # Measurement is done
fig,ax = plt.subplots(figsize=(10,6)) fig,ax = plt.subplots(figsize=(10,6))
...@@ -182,7 +183,7 @@ def replot_results(replot_dict,df,points,title): ...@@ -182,7 +183,7 @@ def replot_results(replot_dict,df,points,title):
if replot_dict['y_scale'].value=='linear': if replot_dict['y_scale'].value=='linear':
y = np.array_split(df[y_col],points) y = np.array_split(df[y_col],points)
else: else:
y = np.array_split(y[x_col].abs(),points) y = np.array_split(df[y_col].abs(),points)
ax.set_yscale('log') ax.set_yscale('log')
# check auto limits # check auto limits
...@@ -202,6 +203,8 @@ def replot_results(replot_dict,df,points,title): ...@@ -202,6 +203,8 @@ def replot_results(replot_dict,df,points,title):
fig.suptitle(title, fontweight ="bold") fig.suptitle(title, fontweight ="bold")
display(fig) display(fig)
except:
information_box("reploting failed please try again")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment