+1 for supportive community. Btw, given below is a reference of what I want to achieve.
Built with the example Plotly grouped bar charts:
import plotly.plotly as py
import plotly.graph_objs as go
trace1 = go.Bar(
x=['giraffes', 'orangutans', 'monkeys'],
y=[20, 14, 23],
name='SF Zoo'
)
trace2 = go.Bar(
x=['giraffes', 'orangutans', 'monkeys'],
y=[12, 18, 29],
name='LA Zoo'
)
data = [trace1, trace2]
layout = go.Layout(
barmode='group'
)
fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename='grouped-bar')
I am aware that the x-axis is relative according to the names, like ['giraffes', 'orangutans', 'monkeys']
, but I am not sure how to add a trace which is relative to group as well as categories which are SF Zoo
and LA Zoo
.