We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2e26e8 commit 1505476Copy full SHA for 1505476
doc/python/datashader.md
@@ -105,7 +105,9 @@ df = pd.read_parquet('https://raw.githubusercontent.com/plotly/datasets/master/2
105
106
cvs = ds.Canvas(plot_width=100, plot_height=100)
107
agg = cvs.points(df, 'SCHEDULED_DEPARTURE', 'DEPARTURE_DELAY')
108
-agg.values = np.log10(agg.values)
+zero_mask = agg.values == 0
109
+agg.values = np.log10(agg.values, where=np.logical_not(zero_mask))
110
+agg.values[zero_mask] = np.nan
111
fig = px.imshow(agg, origin='lower', labels={'color':'Log10(count)'})
112
fig.update_traces(hoverongaps=False)
113
fig.update_layout(coloraxis_colorbar=dict(title='Count', tickprefix='1.e'))
0 commit comments