Skip to content

Instantly share code, notes, and snippets.

@Tejesh-Raut
Created September 28, 2020 19:13
Show Gist options
  • Save Tejesh-Raut/90b0499e767e1d84b3cd6060df68e04a to your computer and use it in GitHub Desktop.
Save Tejesh-Raut/90b0499e767e1d84b3cd6060df68e04a to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
cos_analytical_value = np.sin(2)
plt.plot([cos_analytical_value]*50)
plt.plot(mcos_estimates, '.')
plt.plot(cos_analytical_value + np.array(mcos_std)*3, 'r')
plt.plot(cos_analytical_value - np.array(mcos_std)*3, 'r')
plt.xlabel('Sample size')
plt.ylabel('Monte Carlo estimate')
plt.xticks(plt.xticks()[0],plt.xticks()[0].astype(int)*1000 + 1000)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment