Created
June 15, 2015 14:15
-
-
Save StuartGordonReid/0c634b20a68e3a0bf138 to your computer and use it in GitHub Desktop.
Stochastic Processes Grapher -
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def plot_stochastic_processes(processes, title): | |
""" | |
This method plots a list of stochastic processes with a specified title | |
:return: plots the graph of the two | |
""" | |
plt.style.use(['bmh']) | |
fig, ax = plt.subplots(1) | |
fig.suptitle(title, fontsize=16) | |
ax.set_xlabel('Time, t') | |
ax.set_ylabel('Simulated Asset Price') | |
x_axis = numpy.arange(0, len(processes[0]), 1) | |
for i in range(len(processes)): | |
plt.plot(x_axis, processes[i]) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment