Algoteka
Log in to submit your own samples!

Plot a 3D Scatter Plot

Problem by oml1111
# Tech tags Title Creator Created date
1 0
Plotly
2022-12-18 00:54
View all samples for this language (1 verified and 0 unverified)

Short solution | Python | Plotly |

By oml1111 |
0 likes

Renders the following navigable 3D scatter plot:
Plotly 3D scatter plot

Code

import plotly.express as px

x = [1, 3, 4, 5, 5, 6, 9]
y = [5, 2, 3, 4, 5, 4, 6]
z = [3, 5, 5, 6, 8, 3, 1]
fig = px.scatter_3d(x=x, y=y, z=z)
fig.show()

Further reading

3D Scatter Plots in Python - plotly.com

References

functions
plotly.basedatatypes.BaseFigure.show plotly.com
plotly.express.scatter_3d plotly.com

Problem Description

Render a 3D scatter plot with some existing data points. Include a picture of the graph in the specification.

View sample discussion (0 comments)
View problem discussion (0 comments)