删除散点图中的标记 border/line R
Remove marker border/line in scatterplot plotly R
这是我的代码:
BD_mapinc <- plot_ly(BD_tab, x=~East, y=~North, type='scatter', mode='markers',
text= ~paste("BD incr:", BD_tab$BD_incr, "No.:", Label),
size= ~BD_tab$BD_incr,
marker=list(color = ~BD_tab$BD_incr,
colorbar=list(title='BD increment [%]'),
colorscale='PuOr')
) %>%
layout(plot_bgcolor='#e5ecf6',
xaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'))
)
BD_mapinc
自从我发现如何使用标记选项向色标添加标题后,我也遇到了不需要的标记边框。
有人能帮我吗?我怎样才能删除它们?
What the plot currently looks like
您可以将一些参数移到标记函数中并将线宽设置为零以删除标记周围的线:
BD_mapinc <- plot_ly(BD_tab, x=~East, y=~North, type='scatter', mode='markers',
text= ~paste("BD incr:", BD_tab$BD_incr, "No.:", Label),
marker=list(color = ~BD_tab$BD_incr,
colorbar=list(title='BD increment [%]'),
colorscale='PuOr',
size= ~BD_tab$BD_incr,
line=list(width=0)))%>%
layout(plot_bgcolor='#e5ecf6',
xaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'))
这是我的代码:
BD_mapinc <- plot_ly(BD_tab, x=~East, y=~North, type='scatter', mode='markers',
text= ~paste("BD incr:", BD_tab$BD_incr, "No.:", Label),
size= ~BD_tab$BD_incr,
marker=list(color = ~BD_tab$BD_incr,
colorbar=list(title='BD increment [%]'),
colorscale='PuOr')
) %>%
layout(plot_bgcolor='#e5ecf6',
xaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'))
)
BD_mapinc
自从我发现如何使用标记选项向色标添加标题后,我也遇到了不需要的标记边框。 有人能帮我吗?我怎样才能删除它们? What the plot currently looks like
您可以将一些参数移到标记函数中并将线宽设置为零以删除标记周围的线:
BD_mapinc <- plot_ly(BD_tab, x=~East, y=~North, type='scatter', mode='markers',
text= ~paste("BD incr:", BD_tab$BD_incr, "No.:", Label),
marker=list(color = ~BD_tab$BD_incr,
colorbar=list(title='BD increment [%]'),
colorscale='PuOr',
size= ~BD_tab$BD_incr,
line=list(width=0)))%>%
layout(plot_bgcolor='#e5ecf6',
xaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'),
yaxis = list(
zerolinecolor = '#ffff',
zerolinewidth = 2,
gridcolor = 'ffff'))