Hi all,
I am having problems to plot a simple example from plotly (https://plot.ly/python/v3/3d-surface-lighting/). The code that I used and the error message is below. Using Pycharm with anaconda environment.
Fernando
I am having problems to plot a simple example from plotly (https://plot.ly/python/v3/3d-surface-lighting/). The code that I used and the error message is below. Using Pycharm with anaconda environment.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import plotly.plotly as py import plotly.graph_objs as go import plotly.tools as tls import numpy as np x = np.linspace( - np.pi, np.pi, 100 ) y = np.linspace( - np.pi, np.pi, 100 ) Y, X = np.meshgrid(x, y) Z1 = np.cos(X) * np.sin(Y) Z2 = 2 + np.cos(X) * np.sin(Y) trace1 = go.Surface(z = Z1, colorscale = 'Viridis' ) py.iplot([trace1]) |
Error:ERROR MESSAGE: Traceback (most recent call last):
File "<input>", line 16, in <module>
AttributeError: module 'plotly.plotly' has no attribute 'iplot'
Many thanks in advance,Fernando