I\'d like to be able to add a title to the legend, in the following code. However, looking at the docs, I don\'t think there is a method for this.
import plo
It is very easy to plotly with jupyter through wrapper cufflinks.
install these dependencies:
!pip install pandas cufflinks plotly
create data frame from your data.
import pandas as pd
load data
x=[1, 2, 3, 4, 5]
y=[1, 2, 3, 4, 5]
make second y list to y1
x=[1, 2, 3, 4, 5]
y1=[5, 4, 3, 2, 1]
create dataframe from your data list
data = pd.DataFrame({"x": x, "y": y, "y1": y1}).set_index("x")
load cufflinks and its configuration
import cufflinks as cf
cf.set_config_file(offline=True)
plot dataframe
data.iplot()
You will x on axis, y, y1 on y axis. You can show and hide line clicking on legend from right side.
References: