Plotly chart not showing in Jupyter notebook

You need to change init_notebook_mode call and remove connected=True, if you want to work in offline mode. Such that: # Import the necessaries libraries import plotly.offline as pyo import plotly.graph_objs as go # Set notebook mode to work in offline pyo.init_notebook_mode() # Create traces trace0 = go.Scatter( x=[1, 2, 3, 4], y=[10, 15, 13, 17] … Read more

Interactive matplotlib figures in Google Colab

Below is an example of creating interactive iplot() in Plotly and cufflinks() on Google Colab Notebook. Used functions and suggestions from the answer [1, 2] The key seems to be to include configure_plotly_browser_state() in the cell that does the plotting. Code below should work: Import libraries import datetime from datetime import date import pandas as … Read more

Plotly legend next to each subplot, Python

The solution is to create an HTML file that merge sevral charts offline rendered as html files: import plotly import plotly.offline as py import plotly.graph_objs as go fichier_html_graphs=open(“DASHBOARD.html”,’w’) fichier_html_graphs.write(“<html><head></head><body>”+”\n”) i=0 while 1: if i<=40: i=i+1 #______________________________–Plotly–______________________________________ color1 = ‘#00bfff’ color2 = ‘#ff4000’ trace1 = go.Bar( x = [‘2017-09-25′,’2017-09-26′,’2017-09-27′,’2017-09-28′,’2017-09-29′,’2017-09-30′,’2017-10-01’], y = [25,100,20,7,38,170,200], name=”Debit”, marker=dict( color=color1 ) … Read more