I am trying to create two simple barcharts within one figure using the ‘grid’ dictionary within the ‘layout’ key but I can’t get the figure to make the two subplots. I have:
barchart_layout = dict(
height=550,
width=750,
grid = dict(rows=2, columns=1, xaxes=[“x”, “x2”], yaxes=[“y”, “y2”]),
)
data1 = [dict(x=[1,2,3], y=[5, 5, 5], xaxis=‘x’, yaxis=‘y’)]
data2 = [dict(x=[1,2,3], y=[5, 5, 5], xaxis=‘x2’, yaxis=‘y2’)]
figure = dict(layout = barchart_layout, data=[data1, data2])
With or without the data the figure doesn’t contain subplots so the issue lies in there but I can’t figure out which keywords I am missing. Any help would be appreciated, thanks.