holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.26k stars 363 forks source link

Support antialiasing in pipeline API #1213

Closed ianthomas23 closed 1 year ago

ianthomas23 commented 1 year ago

Fixes #1204.

In the pipeline API we weren't passing through the antialias flag. With this fix, the OP's example works fine for all values of line_width:

import datashader as ds
import pandas as pd

df = pd.DataFrame(dict(x=[0,1],y=[0,1]))

glyph = ds.glyphs.LineAxis0('x','y')
glyph.set_line_width(1)
pipeline = ds.Pipeline(df, glyph)

image = pipeline(x_range=(0,1), y_range=(0,1), width=400, height=400)
codecov[bot] commented 1 year ago

Codecov Report

Merging #1213 (6fd8d37) into main (31b3182) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1213      +/-   ##
==========================================
+ Coverage   84.63%   84.65%   +0.02%     
==========================================
  Files          35       35              
  Lines        8354     8355       +1     
==========================================
+ Hits         7070     7073       +3     
+ Misses       1284     1282       -2     
Impacted Files Coverage Δ
datashader/core.py 88.23% <ø> (-0.03%) :arrow_down:
datashader/glyphs/line.py 93.05% <100.00%> (+0.20%) :arrow_up:
datashader/pipeline.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more