我正在使用plotly来制作散射雷达图,并且在设置每组中的颜色时遇到问题。基本上每当我设置“颜色”参数时,图表都会显示不在原始data.frame中的额外点。
小例子:
df
r t my_sets
1 0.8090 108.00000000000000000 Set1
2 0.3090 -0.00000000000001029 Set3
3 0.8090 35.99999999999999289 Set1
4 0.5871 103.61382244080326132 Set2
5 0.6489 154.43699940042691310 Set2
6 0.3629 175.61382244080323289 Set3
如果我这样做:
p <- plot_ly(data=df, r=r, t=t, mode = "markers")
layout(p, title = "simple_test", plot_bgcolor = toRGB("grey90"))
然而,当我这样做时:
p <- plot_ly(data=df, r=r, t=t, color = my_sets, mode = "markers")
layout(p, title = "simple_test", plot_bgcolor = toRGB("grey90"))
I get 2 extra points with r>1 that are definitely not in my original df.
知道问题是什么吗?如果我在情节网站上运行Hobbs示例,我似乎没有这个问题...