首页 > 解决方案 > 单行柱形图plotly python

问题描述

当我在一列中有多行时,它能够正确绘制,否则无法正确绘制。

请找到下面的代码


fig = px.bar(result, x = attributeName, y = "GapCount",text="GapCount",template="simple_white")
            fig.update_traces(marker_color='rgb(158,202,225)', marker_line_color='rgb(8,48,107)',
                  marker_line_width=1.5, opacity=0.6,textposition='auto')

请在下面的图表中找到

在此处输入图像描述

在此处输入图像描述

当第二个图表中的单行可用时,我希望有一个单条。

标签: pythonplotly-python

解决方案


推荐阅读