向 iplot 条形图添加水平平均线

时间:2021-04-28 15:37:30

标签: python charts mean ggbiplot

我使用以下代码绘制了一年中排名前 20 的公司收入。有没有办法添加一条代表这20家公司平均值的水平线?另外,如果有人能告诉我如何将标题居中,那就太好了!我试过 title_x = 0.5 但出现错误

Top20.iplot(kind = 'bar', x="Company", y="Revenue", 
            title = '<b>'+"Revenue for Top 20 Companies"+'</b>',
            xaxis_title='<b>'+"Company Name"+'</b>',
            yaxis_title='<b>'+"Revenue (in millions)"+'</b>',
            #title_x = 0.5,
            )

0 个答案:

没有答案