我不喜欢叶子类别有不同的不透明度,我找不到改变它的设置
我找到了this related topic,但我使用的是plotly.express而不是plotly.graph\u对象。有没有办法改变它,或者我必须试着把我的px图形变成一个graph_对象? example image
import plotly.express as px
data = dict(
character=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
parent=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
value=[10, 14, 12, 10, 2, 6, 6, 4, 4])
fig =px.sunburst(
data,
names='character',
parents='parent',
values='value',
)
fig.show()
无论您是使用Plotly Express还是Plotly Graph Objects构建您的体形,这都是有效的:
完整代码:
如相关主题中所述,透明度可以通过相应的图形对象进行控制
相关问题 更多 >
编程相关推荐