You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/colorscales.md
+39-4Lines changed: 39 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ jupyter:
6
6
extension: .md
7
7
format_name: markdown
8
8
format_version: '1.1'
9
-
jupytext_version: 1.1.1
9
+
jupytext_version: 1.2.1
10
10
kernelspec:
11
11
display_name: Python 3
12
12
language: python
@@ -20,18 +20,21 @@ jupyter:
20
20
name: python
21
21
nbconvert_exporter: python
22
22
pygments_lexer: ipython3
23
-
version: 3.6.8
23
+
version: 3.7.3
24
24
plotly:
25
25
description: How to set colorscales and heatmap colorscales in Python and Plotly.
26
26
Divergent, sequential, and qualitative colorscales.
27
27
display_as: file_settings
28
+
has_thumbnail: true
29
+
ipynb: ~notebook_demo/187
28
30
language: python
29
31
layout: base
30
32
name: Colorscales
31
33
order: 20
32
34
permalink: python/colorscales/
33
-
thumbnail: thumbnail/heatmap_colorscale.jpg
34
35
redirect_from: python/logarithmic-color-scale/
36
+
thumbnail: thumbnail/heatmap_colorscale.jpg
37
+
v4upgrade: true
35
38
---
36
39
37
40
### Predefined colorscales in Plotly Express
@@ -193,6 +196,38 @@ fig.add_trace(go.Heatmap(
193
196
fig.show()
194
197
```
195
198
199
+
### Setting the Midpoint of a Diverging Colorscale
200
+
The following example uses [marker.cmid](https://plot.ly/python/reference/#scatter-marker-cmid) attribute to set the mid-point of the color domain by scaling 'cmin' and/or 'cmax' to be equidistant to this point. It only has impact when [marker.color](https://plot.ly/python/reference/#scattercarpet-marker-line-color) sets to a numerical array, and 'marker.cauto' is `True`.
0 commit comments