Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61f19f8

Browse files
authored
Merge pull request#218 from plotly/surface_contour_config
config surface contour levels
2 parents78aa26a +f5de709 commit61f19f8

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

‎python/3d-surface-plots.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,35 @@ fig.update_layout(title='Mt Bruno Elevation', autosize=False,
7676

7777
fig.show()
7878
```
79+
####Configure Surface Contour Levels
80+
This example shows how to slice the surface graph on the desired position for each of x, y and z axis.[contours.x.start](https://plot.ly/python/reference/#surface-contours-x-start) sets the starting contour level value,`end` sets the end of it, and`size` sets the step between each contour level.
7981

82+
```python
83+
import plotly.graph_objectsas go
84+
85+
fig= go.Figure(go.Surface(
86+
contours= {
87+
"x": {"show":True,"start":1.5,"end":2,"size":0.04,"color":"white"},
88+
"z": {"show":True,"start":0.5,"end":0.8,"size":0.05}
89+
},
90+
x= [1,2,3,4,5],
91+
y= [1,2,3,4,5],
92+
z= [
93+
[0,1,0,1,0],
94+
[1,0,1,0,1],
95+
[0,1,0,1,0],
96+
[1,0,1,0,1],
97+
[0,1,0,1,0]
98+
]))
99+
fig.update_layout(
100+
scene= {
101+
"xaxis": {"nticks":20},
102+
"zaxis": {"nticks":4},
103+
'camera_eye': {"x":0,"y":-1,"z":0.5},
104+
"aspectratio": {"x":1,"y":1,"z":0.2}
105+
})
106+
fig.show()
107+
```
80108
####Multiple 3D Surface Plots
81109

82110
```python

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp