我正在开发一个python应用程序。我创建了一个基于数据df的三维散点图。情节上的点都有白色的轮廓,当它们紧紧地聚集在一起时,轮廓就显得凌乱了。有没有办法去掉轮廓?
import plotly.plotly as py
import plotly.graph_objs as go
import pandas as pd
df = pd.read_csv("./data.csv")
data = [
go.Scatter3d(
x=df[x_axis],
y=df[y_axis],
z=df[z_axis],
mode='markers',
marker=dict(size=df['size_col']),
)
]
layout = go.Layout(
scene=dict(xaxis={'title': 'x'},
yaxis={'title': 'y'},
zaxis={'title': 'z'}),
margin={'l': 60, 'b': 40, 't': 10, 'r': 10},
legend={'x': 0, 'y': 1},
hovermode='closest'
)
fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename='simple-3d-scatter')这就是我现在看到的样子:三维散点图
这应该是可能的,因为当查看https://plot.ly/python/3d-scatter-plots/#3d-scatter-plot-with-colorscaling时,图中没有这些白色的轮廓。
发布于 2018-11-05 16:24:13
标记对象有它们自己的行属性。
data = [
go.Scatter3d(
x=df[x_axis],
y=df[y_axis],
z=df[z_axis],
mode='markers',
marker=dict(
size=df['size_col'],
line=dict(width=0)
),
)
]https://stackoverflow.com/questions/53157667
复制相似问题