plotly - 绘制直方图标签
问题描述
知道如何在我的绘图直方图上写直接标签吗?我会导出它们,所以我需要写下标签。
fig = go.Figure(data=[
go.Histogram(name='Green', x=df['ACTION'], y=df['1'],text=df['1'],histfunc='sum'),
go.Histogram(name='orange', x=df['ACTION'], y=df['2'],text="test",histfunc='avg'),
go.Histogram(name='blue', x=df['ACTION'], y=df['3'],text="test",histfunc='avg')
])
texposition 适用于条形图,但不适用于直方图。我需要直方图的平均功能。
Invalid property specified for object of type plotly.graph_objs.Histogram: 'textposition'
解决方案
我目前正在寻找直方图上的文本属性,但它似乎没有实现,我认为如果文本没有实现,textposition 也不会
推荐阅读
- docker - 尝试使用 docker 将 metricbeat 连接到 elasticsearch 和 kibana 失败
- ios - 在 SceneKit (SwiftUI) 中初始化场景变化的材质
- ruby-on-rails - 在数据库中存储数千万条记录的最佳选择是什么?
- chart.js - 在 ChartJS 中添加读取线
- java - 协助快速排序算法在一个数组中处理字母和数字字符值
- java - 由于 logisim,jdk-13.0.2 对计算机不可见
- c++ - 使用 string::size_type vs int 遍历字符串
- mongoose - 猫鼬排序与近和GeoJson
- ruby-on-rails - Ruby on Rails。第一次运行应用程序。继续在浏览器中遇到同样的错误。页面控制器
- python-3.x - 将 tkinter 小部件居中