May 15, 2018, 4:53pm
I asked this question
here but the problem might be python specific.
How do I remove the coordinate projections on hover for a surface in python plotly? According to the
reference, I thought the following would do it, but they still appear.
import plotly.graph_objs as go
import numpy as np
theta = np.linspace(0,2*np.pi,50)
x = np.linspace(0,10,50)
tg,xg = np.meshgrid(theta,x)
y = np.cos(tg)
z = np.sin(tg)
contours = dict(
surf = go.Surface(x=xg,y=y,z=z,contours=contours,opacity=0.7)
fig = go.Figure(data=[surf])
Thanks for any help you can provide.
May 15, 2018, 6:02pm
@bob It seems that you want to remove the coordinates displayed on hover.
If this is the case, insert
hoverinfo='none'in the surf definition:
surf = go.Surface(x=xg, y=y, z=z, hoverinfo='none', opacity=0.7)
May 15, 2018, 9:06pm
@empet Thank you for your reply. However, that is not what I’m interested in. I’m interested in the black lines present in the surface and their projections into the ambient coordinate system, as pictured here:
A different, but related question maybe you can help answer: in your understanding, what does/should the False values in the following do?
I thought it would give the desired effect, but it actually seems to do nothing.
May 16, 2018, 9:18am
@bob What you call projections are in fact the intersections of the x, y, respectively z - planes through a point of the surface with that surface.
Projections onto the z-plane, for example, are the level-lines (contour lines) on the surface projected orthogonally onto the z-plane.
Here is the Plotly reference: https://plot.ly/python/reference/#surface-contours and here an example:
Analogously you can project the contour lines onto the x or y-plane.
May 16, 2018, 2:52pm
@empet Thank you for your informative reply. I totally get the meaning behind the projections. Is there any way to get rid of the lines I described?
May 16, 2018, 3:12pm
@bob No, you cannot remove the lines of intersection
May 18, 2018, 12:48am
@empet Apparently the lines I was referring to are called ‘spikes’. They can be turned off in
layout -> scene -> zaxis -> showspikes=False.