Skip to content

Hover info broken in 3D scatter plot with opacity 1 #952

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

Closed
michalkahle opened this issue Mar 2, 2018 · 17 comments
Closed

Hover info broken in 3D scatter plot with opacity 1 #952

michalkahle opened this issue Mar 2, 2018 · 17 comments

Comments

@michalkahle
Copy link

Hi,
in 3D scatter when marker opacity is set to 1 and when you hover over any point only one hover label is shown. Specifically it is the label belonging to the first point in data. See for yourself:

x, y, z = np.random.multivariate_normal(np.array([0,0,0]), np.eye(3), 200).transpose()
trace1 = go.Scatter3d(
    x=x,
    y=y,
    z=z,
    mode='markers',
    marker=dict(
        size=12,
        line=dict(
            color='rgba(217, 217, 217, 0.14)',
            width=0.5
        ),
        opacity=1
    )
)

data = [trace1]
layout = go.Layout(
    margin=dict(
        l=0,
        r=0,
        b=0,
        t=0
    )
)
fig = go.Figure(data=data, layout=layout)
plotly.offline.iplot(fig)

scatter plot

@cldougl
Copy link
Member

cldougl commented Mar 2, 2018

Hi there,
The above code does not produce an issue for me:

3d

Can you confirm that you're using an updated version of the python api: 2.4.1?

@michalkahle
Copy link
Author

michalkahle commented Mar 5, 2018

Hi @cldougl,
I have updated to 2.4.1 but I still see this issue. I run python 3.6.3.
plotly_hover_2

@cldougl
Copy link
Member

cldougl commented Mar 5, 2018

Hey @michalkahle,
I'm still unable to reproduce with python 3.6 - can you confirm:

  • you only see this issue with opacity=1 (as noted in the title)?
  • which version of jupyter you're using?
  • which browser/version you're using?

@michalkahle
Copy link
Author

Yes it only happens with opacity 1 (or > 1). When there are more traces they must have all opacity >=1 and this issue happens only to the first trace; the rest is fine.

I'm using Chromium Version 64.0.3282.167 but I see this issue with Firefox as well.

My jupyter server:
image

@michalkahle
Copy link
Author

I fixed this provisionally by adding this fake trace to the beginning of the list:
go.Scatter3d(x=[0], y=[0], z=[0], marker={'color':'rgb(0, 0, 0)', 'opacity': 1, 'size': 0.1}, showlegend=False).

@hits-nlp
Copy link

Thanks, @michalkahle, that fix worked nicely for me.

@jonmmease
Copy link
Contributor

Hi @michalkahle , I'm not able to reproduce this issue with plotly.py 3.2.1 in firefox or chrome. Could you give it a try once more with the latest plotly.py? If you still have the problem, I'd like to see if we can translate it into pure JavaScript to get something for the plotly.js folks to look at. Thanks!

@lorelupo
Copy link

lorelupo commented Oct 7, 2018

Hi all, I can reproduce the same issue, with online plotting too.
Here are my specs:

  • python 3.5.2
  • plotly 3.2.1
  • Ubuntu 16.04.4 LTS
  • Firefox Quantum 62.0.3

@jonmmease
Copy link
Contributor

Thanks for the info @wolflo ,
@michalkahle , could you let us know what operating system you're using? Thanks!
-Jon

@lorelupo
Copy link

lorelupo commented Oct 8, 2018

Thanks for the info @wolflo ,
@michalkahle , could you let us know what operating system you're using? Thanks!
-Jon

Is not Ubuntu 16.04.4 LTS a sufficient information about my operating system? what else do you need?
Thanks!

@jonmmease
Copy link
Contributor

Hi @wolflo , yes that's sufficient. I was asking @michalkahle if he could share his info as well. Thanks!

@michalkahle
Copy link
Author

Hi @jonmmease , sorry for taking long to respond. I just tried to upgrade do plotly.py 3.3.0 and the issue is still there. My OS is also Ubuntu 16.04. And now I also tested with Chrome 69 on Windows 7 (32bit) in a VM and the issue is not present there. :(

@jonmmease
Copy link
Contributor

Thanks @michalkahle! Well maybe there is something about Ubuntu 16.04 here...

@jonmmease
Copy link
Contributor

jonmmease commented Oct 24, 2018

Hi @michalkahle and @wolflo, could you try this CodePen example on Ubuntu 16.04 (and on any other OSs you have access to) and let us know if the problem exists there?

https://codepen.io/jonmmease/pen/aRQvqM

If you can reproduce on this example, then we've ruled out plotly.py and can move this issue to the plotly.js repo. Thanks!

@michalkahle
Copy link
Author

michalkahle commented Oct 26, 2018

@jonmmease I tested your example and I can reproduce the issue when I set the opacity to 1 and dragmode to true. I've since upgraded to Ubuntu 18.04 and the issue still present.

https://codepen.io/michalkahle/pen/vVbKZb

@archmoj
Copy link
Contributor

archmoj commented Mar 11, 2019

@michalkahle @jonmmease I think we may close this issue which could be fixed in plotly/plotly.js#3258.

@michalkahle
Copy link
Author

Thank you @archmoj ! I can confirm the issue is gone in plotly for python v. 3.5.0 on Ubuntu.

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

6 participants