Created
June 13, 2017 18:12
-
-
Save william-r-s/22d5dfb3365e26209dc348b89abc0402 to your computer and use it in GitHub Desktop.
Ploty + matplotlib in hydrogen
This file contains hidden or 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
import matplotlib.pyplot as plt | |
import numpy as np | |
import plotly.tools as tls | |
from plotly import offline as py | |
py.init_notebook_mode() | |
plt.ioff() | |
t = np.linspace(0, 20, 500) | |
def showi(*args, **kwargs): | |
py.iplot(tls.mpl_to_plotly(plt.gcf())) | |
# plt.close() | |
showi(plt.plot(t, np.sin(t))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment