spatialdata-plot
spatialdata-plot copied to clipboard
Different outline linewidths between matplotlib and datashader
In datashader, linewidths are given in pixels, e.g. to Canvas.line(), while matplotlib measures linewidths in points. This leads to differences in the plotting results that are bigger the larger the linewidth value. Example:
import spatialdata_plot
from spatialdata.datasets import blobs
blob = blobs()
blob.pl.render_shapes("blobs_circles", outline_width=20).pl.show()
gives
whereas
blob.pl.render_shapes("blobs_circles", outline_width=20, method="datashader").pl.show()
gives
Would be good if the value passed to datashader would be normalized at some point so that the result would be closer to matplotlib.