pot*_*kan 5 r border scatter-plot r-plotly
我正在尝试创建一个plotly带点边界的散点图.
理想的是:
plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length,
marker = list(size = 10,
color = 'rgba(255, 182, 193, .9)',
line = list(color = 'rgba(152, 0, 0, .8)',
width = 2)))
Run Code Online (Sandbox Code Playgroud)
但在我(更复杂)的情况下,我正在用这样的add_markers函数创建情节:
plot_ly(data = iris) %>%
add_markers(x = ~Sepal.Length, y = ~Petal.Length,
color = 'rgba(255, 182, 193, .9)')
Run Code Online (Sandbox Code Playgroud)
添加symbol = "circle-open"为参数也无济于事.
请帮忙.
您必须将这些属性作为list参数提供marker:
plot_ly(data = iris) %>%
add_markers(x = ~Sepal.Length,
y = ~Petal.Length,
marker = list(
color = 'rgba(255, 182, 193,0.5)',
line = list(color = 'rgba(152, 0, 0, .8)',
width = 2)
)
)
Run Code Online (Sandbox Code Playgroud)