Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotly extension problem rendering opacity with Scatter3d #183

Open
nielsgl opened this issue Mar 19, 2019 · 0 comments
Open

Plotly extension problem rendering opacity with Scatter3d #183

nielsgl opened this issue Mar 19, 2019 · 0 comments

Comments

@nielsgl
Copy link

nielsgl commented Mar 19, 2019

Hi,

I am experiencing a problem rendering a Scatter3d plot with opacity using the plotly extension in jupyterlab. X_pca is a m x 3 matrix of with 3 pca components.
This is the code that I have to create my plot:

data = []

for name in y.value_counts().keys():
	trace = go.Scatter3d(
		x=X_pca[y==name,0],
		y=X_pca[y==name,1],
		z=X_pca[y==name,2],
		mode='markers',
		name=''.join(map(lambda x: x[0], name.split(' '))),
		marker=dict(size=12, symbol='circle', line=dict(width=1), opacity=1)
	)
	data.append(trace)

layout = go.Layout(
	height=1200,
	width=1200,
)

fig = go.Figure(data=data, layout=layout)

py.iplot(fig)

When I plot the 3d scatter plot without opacity (or opacity=1) it renders fine, but when I set the opacity to anything lower than 1 it doesn't render properly.

You can see the differences here: http://nvgl.it/pxOVpK

I'm using python 3.7.2, with the latest version of jupyterlab and the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant