在图中显示雷达图上的数据点
我找不到有关如何显示数据点的答案(请参阅r
go.scatterpolar
中指示)。也许有人知道如何实现这一目标?
此外,从0-5的数字奇怪地旋转,我找不到解决方法的方法。 任何提示,评论和建议都将不胜感激。
这是一个虚拟代码:
import plotly.graph_objects as go
from plotly.subplots import make_subplots
fig = go.Figure()
question= ["Q1", "Q2","Q3", "Q4"]
fig = make_subplots(rows=2, cols=2, specs=[[{'type': 'polar'}] * 2] * 2)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph 1"
),
row=1,
col=1,
)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph2"
),
row=1,
col=2,
)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph3"
),
row=2,
col=1,
)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph4"
),
row=2,
col=2,
)
这是plitly中的雷达图:
理想情况下,我想以一种优雅的方式显示图表外的值,以免混乱。看到我在下面的油漆中不良尝试。如果那不起作用,其他任何东西也可以
I cannot find an answer on how to display the data points (see r
indicated in go.Scatterpolar
). Maybe someone has an idea how to achieve that?
Additionally, the numbers from 0-5 are oddly rotated, and I cannot find a way on how to fix it.
Any hints, comments, and suggestions would be highly appreciated.
This is a dummy code:
import plotly.graph_objects as go
from plotly.subplots import make_subplots
fig = go.Figure()
question= ["Q1", "Q2","Q3", "Q4"]
fig = make_subplots(rows=2, cols=2, specs=[[{'type': 'polar'}] * 2] * 2)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph 1"
),
row=1,
col=1,
)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph2"
),
row=1,
col=2,
)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph3"
),
row=2,
col=1,
)
fig.add_trace(
go.Scatterpolar(
theta= question, #question
r=[5.60, 5.62, 5.60, 5.59],
name = "Graph4"
),
row=2,
col=2,
)
Here is the radar graph in plotly:
Ideally I would like to have an elegant way of showing the values outside the graph, so that it is not cluttered. See my poor attempt in Paint below. If that doesn't work, anything else is also fine
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
极性坐标中的散点图与常规散点图相同,并且具有一个模式,因此可以通过设置线和字符串来显示它们。绳子位于顶部的中心。要调整当时的比例,请在布局更新中设置轴范围。
Scatter plots in polar coordinates are the same as regular scatter plots and have a mode so that they can be displayed by setting the line and string. The string is positioned at the center of the top. To adjust the scale at that time, set the axis range in the layout update.