Is there anyway to make Plot.ly graphics make up html?

I work almost exclusively with Python. My ideal piping is shown below:

SQL> Python (pandas, numpy)> Plotly> Standalone HTML Reports

So, Python is used to handle SQL handling, and as soon as the visual compiles in my iPython Notebook, I would like to share stand-alone visuals through an attachment.

Possible? This is done in order to make any visual effects that I want to use for lighting and mobile devices. Thus, it should not bear when reading scripts or data and display only visual ones.

Bokeh allows you to create standalone HTML files, but Plotly will be an easier option for me.

+4
source share
2 answers

Offline plotly for python now supports stand-alone stand-alone HTML files using the plotly.offline.plot command.

Example from https://plot.ly/python/getting-started/

import plotly
print plotly.__version__  # version >1.9.4 required
from plotly.graph_objs import Scatter, Layout
plotly.offline.plot({
"data": [
    Scatter(x=[1, 2, 3, 4], y=[4, 1, 3, 7])
],
"layout": Layout(
    title="hello world"
)
})

Much more to explore, although I ran into problems trying to figure out functions and methods.

+4
source

https://plot.ly/python/html-reports/

Also use the built-in mode to plot charts without the api key.

import plotly.offline as py
 # for inline graphs
 py.init_notebook_mode()
0
source

Source: https://habr.com/ru/post/1620481/


All Articles