Using pandas & matplotlib I've created a handy graphic for our team to monitor revenue. For each of our customers it shows last month (light grey), best month (dark grey), and the forecast range for this month (green).
It's basically two stacked bar charts of differing widths.
ax = df.plot(kind='barh', x='company', y=['last_month', 'best-last'], width=0.2, color=context_colors, lw=0, stacked=True)
df.plot(kind='barh', x='company', y=['forecast_low', 'hi-lo'], stacked=True, colors=range_colors, lw=0, ax=ax)
Works great in python. For reasons not worth going into, this image won't show up correctly-sized on the site it needs to go on. So I'm trying plotly for the first time.
I haven't been able to find similar functionality. I tried building separate stacked charts and then combining them by running sequential iplot
, but it just builds two separate plots.
eg
iplot(fig)
iplot(fig2)
And trying to combine figs is no good (eg iplot(fig, fig2)
), which just plots the data in the first one.
Any suggestions for how to replicate in plotly?