Skip to content

Commit

Permalink
fixed failing plots of complex values
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipDominec committed Oct 4, 2017
1 parent d18d9e5 commit 7f3f1e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meep_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ def diagnostic_plot(x, values_and_labels=(), plotmodulus=False, ylog=True, title
for value, label in values_and_labels:
plt.plot(x, np.abs(value) if plotmodulus else value, label=label)
if plotmin==None or plotmin > np.min(value):
plotmin = max(np.min(value), np.max(value)/1e10)
plotmin = max(np.min(np.abs(value)), np.max(np.abs(value))/1e10)
plt.legend(prop={'size':10}, loc='lower left')
plt.xlabel(xlabel); plt.ylabel(ylabel); plt.title(title)
if ylog and len(values_and_labels)>0:
Expand Down

0 comments on commit 7f3f1e2

Please sign in to comment.