I am creating images using plotly library and trying to display in HTML. I have format the images in HTML format. But display(HTML(report_html)) code is not displaying HTML page.
I am using python 3.5 and pycharm IDE. I am not using iPython notebook.
Source code:
from IPython.display import display, HTML, Image
import plotly.plotly as py
from plotly.offline import init_notebook_mode
init_notebook_mode()
data = go.scatter(x=df['date'], y=i, name = long_name['value'])
figures = [data]
images = [base64.b64encode(py.image.get(figure, width=width,height=height)).decode('utf-8') for figure in figures]
report_html = ''
for image in images:
_ = template
_ = _.format(image=image, caption='', width=width, height=height)
report_html += _
display(HTML(report_html))
I am not getting any error. I am just getting following output
IPython.core.display.HTML object