0

enter image description hereI'm using Pycharm on W10, I'm following a guide on Jupyter and so I get some difficulties like that. I can't see the graph

import pandas as pd
import numpy as np
import plotly.offline as py

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot

import cufflinks as cf
init_notebook_mode(connected=True)
cf.go_offline()


df = pd.DataFrame(np.random.randn(100, 4), columns='A B C D'.split())

df.iplot(kind='scatter',x='A',y='B',mode='markers',size=10, filename="scatter.html")

I don't get any error, but I can't see my graph, any suggestion?

Elio.b
  • 21
  • 7
  • Possible duplicate of [Plotly chart is not displayed in PyCharm](https://stackoverflow.com/questions/50250010/plotly-chart-is-not-displayed-in-pycharm) – Trenton McKinney Jul 29 '19 at 21:30
  • I answered this question in https://stackoverflow.com/questions/50250010/plotly-chart-is-not-displayed-in-pycharm – nicolaskruchten Jul 30 '19 at 01:33

1 Answers1

3

I found the solution to my problem, I have the output request using PyCharm:

import plotly.offline as py
import cufflinks as cf
import pandas as pd
import numpy as np


df = pd.DataFrame(np.random.randn(100, 4), columns='A B C D'.split())

py.plot([{
    'x': df.index,
    'y': df[col],
    'name': col

}for col in df.columns], filename='simple-line.html')

Thanks.

Elio.b
  • 21
  • 7