Plotly error - AttributeError: module 'plotly.plotly' has no attribute 'iplot' - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Plotly error - AttributeError: module 'plotly.plotly' has no attribute 'iplot' (/thread-20030.html) |
Plotly error - AttributeError: module 'plotly.plotly' has no attribute 'iplot' - fernando_santos - Jul-24-2019 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. 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]) Many thanks in advance,Fernando |