【发布时间】:2020-04-30 19:06:19
【问题描述】:
每当我制作 Plotly 旭日形图(我使用 Python)时,最外面的“圆”或环比其他旭日形环要轻得多。我怎样才能让这个环的阴影与图表的其余部分相同?
如您所见,标记为 Bb5 的片段比其他片段更轻。
我正在使用标准的 Plotly sunburst 代码。简单的例子(无论如何都会变浅):
import plotly.graph_objects as go
fig =go.Figure(go.Sunburst(
labels=["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"],
parents=["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve" ],
values=[10, 14, 12, 10, 2, 6, 6, 4, 4],
))
# Update layout for tight margin
# See https://plotly.com/python/creating-and-updating-figures/
fig.update_layout(margin = dict(t=0, l=0, r=0, b=0))
fig.show()
【问题讨论】:
标签: python plotly plotly-python sunburst-diagram