Skip to content

Commit d70fe14

Browse files
committed
datashader example
1 parent e3ec430 commit d70fe14

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

doc/python/datashader.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ jupyter:
55
text_representation:
66
extension: .md
77
format_name: markdown
8-
format_version: "1.2"
9-
jupytext_version: 1.3.1
8+
format_version: '1.2'
9+
jupytext_version: 1.3.0
1010
kernelspec:
1111
display_name: Python 3
1212
language: python
@@ -22,8 +22,7 @@ jupyter:
2222
pygments_lexer: ipython3
2323
version: 3.7.3
2424
plotly:
25-
description:
26-
How to use datashader to rasterize large datasets, and visualize
25+
description: How to use datashader to rasterize large datasets, and visualize
2726
the generated raster data with plotly.
2827
display_as: scientific
2928
language: python
@@ -107,9 +106,12 @@ df = pd.read_parquet('https://raw.githubusercontent.com/plotly/datasets/master/2
107106
cvs = ds.Canvas(plot_width=100, plot_height=100)
108107
agg = cvs.points(df, 'SCHEDULED_DEPARTURE', 'DEPARTURE_DELAY')
109108
agg.values = np.log10(agg.values)
110-
agg.attrs['long_name'] = 'Log10(count)'
111-
fig = px.imshow(agg, origin='lower')
109+
fig = px.imshow(agg, origin='lower', labels={'color':'Log10(count)'})
112110
fig.update_traces(hoverongaps=False)
113-
fig.update_layout(coloraxis_colorbar=dict(title='Count (Log)', tickprefix='1.e'))
111+
fig.update_layout(coloraxis_colorbar=dict(title='Count', tickprefix='1.e'))
114112
fig.show()
115113
```
114+
115+
```python
116+
117+
```

0 commit comments

Comments
 (0)