Open
Description
Status after #309, just to document some thoughts/details about the comparison between ds and mpl:
- outlines linewidth with datashader seems to vary slightly between e.g. polygons and circles, which is not the case with matplotlib
- below you see that the outlines of the circles are slightly cut in places where the extent of circles ends, but is later on expanded because of the polygons. This is similar to what we see with points. It should only be a problem with large linewidth values though.
fill_alpha
in ds looks lighter than in mpl, even though it's0.5
both times. Reason: in ds, the fill_alpha is applied two times: once during theshade()
step, to make sure elements are blended with each other. Then also during the rendering of the resulting image, to make sure other things that were plotted before still shine through. Possible fix: usesqrt(fill_alpha)
both times. Problem: if sth else is rendered below, it would be obvious that the elements are less transparent than the user would expect (e.g. 0.7 instead of 0.5). That could be confusing.
import spatialdata_plot
from spatialdata.datasets import blobs
blob=blobs()
blob.pl.render_shapes(method="datashader", fill_alpha=0.5, outline_alpha=0.7, color="red", outline_color="blue", outline_width=5).pl.show()
blob.pl.render_shapes(method="matplotlib", fill_alpha=0.5, outline_alpha=0.7, color="red", outline_color="blue", outline_width=5).pl.show()