Reputation: 1
I wonder if is possible to make a sublot with different columns size and number per each row USING PLOTLY.GRAPH_OBJECTS and PLOTLY.SUBPLOTS. like the photoes (sry for the hand made).
[img 1 row 1 has 2 cols, row 2 has 4 cols: (https://i.sstatic.net/g6XVm.jpg)]
[img 2 row 1 has 3 cols, 2 of the same width and 1 of different width, row 2 has 4 cols egual to col 3 of row: (https://i.sstatic.net/2efPQ.jpg)]
it is everything a lot cofused but I hope that you all understand and could give me an answear.
I can set different cols size but this must be egual for each row. I would need different set per row.
Upvotes: 0
Views: 133
Reputation: 1
Yes, is possible.
For example here, shape gives 4 columns and row, and loc identify the position of each ax.
Colspan allow you to make a plot of 1 column or 2 columns.
fig, (axe1) = plt.subplots(1,1, sharex=False, sharey=False)
ax1 = plt.subplot2grid (shape=(4, 4), loc=(0, 0), colspan=1)
ax2 = plt.subplot2grid (shape=(4, 4), loc=(0, 1), colspan=1)
ax3 = plt.subplot2grid (shape=(4, 4), loc=(1, 0), colspan=1)
ax4 = plt.subplot2grid (shape=(4, 4), loc=(1, 1), colspan=1)
Upvotes: 0