Skip to content

Commit 954a90e

Browse files
committed
improve example
1 parent 86a6c55 commit 954a90e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

doc/python/b64.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,15 @@ N = 10000
8989
x = np.random.randn(N)
9090
y = np.random.randn(N).astype('float32')
9191
z = np.random.randint(size=N, low=0, high=256, dtype='uint8')
92+
c = np.random.randint(size=N, low=-10, high=10, dtype='int8')
9293

9394
fig = go.Figure(data=[go.Scatter3d(
9495
x=b64(x),
9596
y=b64(y),
9697
z=b64(z),
98+
marker=dict(color= b64(c)),
9799
mode='markers',
98-
opacity=0.1
100+
opacity=0.2
99101
)])
100102

101103
fig.show()
@@ -114,13 +116,15 @@ N = 10000
114116
x = np.random.randn(N)
115117
y = np.random.randn(N).astype('float32')
116118
z = np.random.randint(size=N, low=0, high=256, dtype='uint8')
119+
c = np.random.randint(size=N, low=-10, high=10, dtype='int8')
117120

118121
fig = go.Figure(data=[go.Scatter3d(
119122
x=x,
120123
y=y,
121124
z=z,
125+
marker=dict(color=c),
122126
mode='markers',
123-
opacity=0.1
127+
opacity=0.2
124128
)])
125129

126130
fig.show()

0 commit comments

Comments
 (0)