How can I make legends have colours that correspond to data points using Python's Plotly?
I'm following the Plotly documentation for colouring a scatter graph. Here is my code: I first create a fake data frame with the same shape as what I'm working with: import pandas import colorlover as cl import plotly import plotly.graph_objs as go import numpy data = numpy.random.normal(0, 1, 3*6*11*2) data = data.reshape(((3*6*11), 2)) data = pandas.DataFrame(data) sub_experiments = ['Subexperiment_{}'.format(i) for i in [1, 2, 3]] repeats = ['Repeat_{}'.format(i) for i in range(1, 7)] time = ['{}h'.format(i) for i in range(11)] array = [sub_experiments, repeats, time] idx = pandas.MultiInde
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.