Skip to content

Commit

Permalink
Fixed missing import & added plt.show() calls.
Browse files Browse the repository at this point in the history
Existing hawkes.py refers to a 'plt' variable, but this must
first be imported to be used. Also, for the plots to display
two separate plt.show() calls are added

Note: the first plots must be closed before the last is shown,
otherwise the final QQ plot is drawn on top of the previous plot).
  • Loading branch information
Pat-Laub committed Apr 10, 2014
1 parent 6da64b7 commit caebd64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hawkes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def rate_series(t, x):

## plot settings
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rc('font', **{'sans-serif':'Verdana','family':'sans-serif','size':8})
mpl.rcParams['xtick.direction'] = 'out'
mpl.rcParams['ytick.direction'] = 'out'
Expand Down Expand Up @@ -84,7 +85,7 @@ def rate_series(t, x):
ax.set_title('Fitted vs Empirical Intensities')

plt.draw()

plt.show()

## QQ plot of residuals
import scipy.stats as stats
Expand All @@ -94,4 +95,4 @@ def rate_series(t, x):
ax.set_title('Residual Interevent Times')

plt.draw()

plt.show()

0 comments on commit caebd64

Please sign in to comment.