plotly / plotly.py

The interactive graphing library for Python :sparkles: This project now includes Plotly Express!
https://plotly.com/python/
MIT License
16.18k stars 2.54k forks source link

Isosurface and other 3D types prevent Scatterplot hover #1777

Open creative-resort opened 5 years ago

creative-resort commented 5 years ago

plotly version: 4.1.0

When plotting an Isosurface, Mesh3D etc, and also a Scatter3D trace, the Isosurface object seems to prevent the hover functionality of the Scatter-Plot when trying to hover over a Scatter3D marker, even though the Isosurface's hoverinfo parameter has been set to "skip".

reproducible example:

from pandas import DataFrame as DF
import plotly.graph_objects as go

df = DF([(20,10,400)])
plot = go.Figure()
plot.add_trace(go.Isosurface(
                    x=[5,5,5,5,50,50,50,50],
                    y=[25,0,25,0,25,0,25,0],
                    z=[500,500,0,0,500,500,0,0],
                    value=[1,2,3,4,5,6,7,8],

                    hoverinfo='skip',
                    opacity=0.05,
                    colorscale=[[0,'yellow'],[1,'yellow']],
                    showscale=False
                )
)

plot.add_trace(go.Scatter3d(
    x=df[0], y=df[1], z=df[2],
    mode='markers', marker={'color': 'midnightblue', 'size': 5}, opacity=1,
    name='scatterplot'
    )
)

plot.show()
emmanuelle commented 5 years ago

I could indeed reproduce your issue. When the point is outside the closed isosurface there is no problem it's only when it's inside the surface...

creative-resort commented 3 years ago

@emmanuelle, has this ever been addressed? It's still the same existing issue in plotly v5.2.2

Here is an application, where I need the isosurfaces for giving the user a visual cue on the facets of a dataset, while they still should be able to explore the datapoints by hovering the mouse cursor over them.

2021-08-26_211211

M4tz0r commented 1 year ago

Still an issue in plotly 5.6.0