Skip to content

Commit 7aa95ae

Browse files
author
mahdis-z
committed
make_subplots
1 parent be88921 commit 7aa95ae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/colorscales.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,11 @@ fig.show()
284284
```
285285

286286
### Share Color Axis
287-
This example shows how to specify the color scale and color bar per trace. To share colorscale information in multiple subplots, you can use [coloraxis](https://plot.ly/javascript/reference/#scatter-marker-line-coloraxis).
288-
Below we show how to set a reference coloraxis to a shared coloraxis, which are set in the layout. Note that multiple color scales can be linked to the same color.
289-
287+
This example shows how traces can share colorbars. To share colorscale information in multiple subplots, you can use [coloraxis](https://plot.ly/javascript/reference/#scatter-marker-line-coloraxis).
290288

291289
```python
292290
import plotly.graph_objects as go
291+
from plotly.subplots import make_subplots
293292

294293
fig = make_subplots(1,2)
295294

@@ -298,7 +297,7 @@ fig.add_trace(
298297

299298
fig.add_trace(
300299
go.Heatmap(x = [3, 4, 5, 6], z = [[10, 2, 1, 0], [4, 3, 5, 6]], coloraxis = "coloraxis"),1,2)
301-
fig.update_layout(coloraxis = {'colorscale':'jet'})
300+
fig.update_layout(coloraxis = {'colorscale':'viridis'})
302301

303302
fig.show()
304303
```

0 commit comments

Comments
 (0)