How to handle discrete data and scale factor
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 376
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 1
Description
Hi all,
Datashader is great to find patterns in my datasets, however I'm currently working with a dataset that has a low resolution in one axis. According to one of the examples of Datashader, one could use the width_scale factor to reduce this effect. However when I tune the scale factor, to my liking, and then zoom in, the gaps between my data increase, making it almost impossible to see any patterns.
What is the correct way to handle discrete data?
This should be a self contained example which shows the effect.
```python
import pandas as pd
import numpy as np
from bokeh.plotting import figure, output_notebook, show
import datashader as ds
output_notebook()
p = figure(
x_range=(-5,5),
y_range=(-5,5),
tools='pan,wheel_zoom,box_zoom,reset',
plot_width=800,
plot_height=500,
)
n = 10000
df = pd.DataFrame({'x':np.random.normal(size=n),'y':np.random.normal(size=n)})
df.x = df.x.round()
pipeline = ds.Pipeline(df, ds.glyphs.Point("x", "y"), width_scale=0.04)
InteractiveImage(p, pipeline)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.