title: In plotly, how to pass a list or a dict of trace names to the graph_objects.Layout functions?
body: <p>I've made a simple function that takes a dict of labels and corresponding dataframes (with same columns), a column to trace from every dataframe and a barmode setting. Here is the code:</p>
  <pre><code>def multiple_histogram_plotter(dict_of_labels_and_dataframes, column, barmode):
      data_for_fig = []
      for name_of_df, df_chosen in dict_of_labels_and_dataframes.items():
          hist = go.Histogram(x=df_chosen[column], opacity=0.75, histnorm='probability')
          data_for_fig.append(hist)
      fig = go.Figure(data=data_for_fig, layout=go.Layout(barmode=barmode))
      fig.show()
  </code></pre>
  <p>What this does is draws any number of histograms I want in the same space, depending on the length of the dict passed. In its current form, though, it names all the histograms as 'trace0, trace1', etc. I was trying to find a parameter in the Layout function that would rename the traces, but haven't been able to, Google didn't help either.</p>