Created
May 31, 2020 12:43
-
-
Save pierrelouisbescond/c0ee9577dee031f88f1a47f3a56f6373 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
min_axis, max_axis = -50, 50 | |
fig = go.Figure() | |
# Let's plot the whole dataset | |
fig.add_trace(go.Scatter3d(x=df["X"], y=df["y"], z=df["z"],mode='markers', name="dataset")) | |
# And add a virtual 2D plan based on some of the dataset dots | |
fig.add_trace(go.Scatter3d(x=[-14,0,4,15], y=[-17,-27,30,7], z=[-31,-1,15,41],mode='markers', surfaceaxis=1, opacity=0.5, name="surface")) | |
fig.update_traces(marker=dict(size=3)) | |
fig.update_layout( | |
scene = dict( | |
xaxis = dict(range=[min_axis,max_axis],), | |
yaxis = dict(range=[min_axis,max_axis],), | |
zaxis = dict(range=[min_axis,max_axis],),), | |
height=800, | |
margin=dict(r=20, l=10, b=10, t=10) | |
) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment