I would like to see Plotly's HTML output in the PyCharm IDE. It currently says:
Process finished with exit code 0
for the output. However, I receive a graphical result in Jupyter
To see the Plotly html output use the offline feature. For example, like this:
plotly.offline.plot(*yourplotname*, filename='file.html')
Run the code in pycharm and it will save the .html file locally in your work folder and open the .html in your browser to view.
Dnaiel, as far as I understand plotly, it always creates an HTML file somewhere. Even in jupyter notebooks, I assume plotly creates a temporary HTML file although it draws the graph in the same window.
However, you can still use plotly in pycharm without having to specify the name of the new file. In that case, plotly simply overwrites the previous temporary HTML file in your working directory.
plotly.offline.plot(df2.iplot(kind='TypeOfChart',x='X_Var',y='Y_Var', asFigure=True))
In PyCharm 2020.3, I was able to make a multi-element 3D plot, working with the poliastro package. The plot auto-loaded into Safari with interactive features.
#%% Plotting in 3D
frame = OrbitPlotter3D(plane=Planes.EARTH_ECLIPTIC)
frame.set_attractor(Sun)
apollo_orbit = Orbit.from_ephem(Sun, apollo_ephem, EPOCH)
apollo_orbit.plot(label="Apollo", use_3d=True, interactive=True)
# frame.set_orbit_frame(Orbit.from_ephem(Earth, apollo_ephem_e, EPOCH))
# 2021-Jul-08 12:07 : First time trying plotly.offline.plot
fp = frame.plot(apollo_orbit)
frame.plot_body_orbit(Earth, EPOCH) # 2021-Jul-08 12:07 : Apparently adds to the object created in the previous line
plotly.offline.plot(fp) # 2021-Jul-08 12:07 : Result is an html file that pops up in a browser, has interactive