-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
For plotting points with matplotlib, we use the s
argument of scatter()
. The square root of s
specifies the width and height of the markers in points.
In the datashader approach, we use ds.tf.spread(agg, px=px)
to regulate the size of the markers. Here, px
is calculated like this: px = int(np.round(np.sqrt(render_params.size)))
, to make the behavior agree to the matplotlib approach.
Problem: If you alter the dpi
in pl.show()
, the point size of the datashader points remains the same, whileit changes for matplotlib, leading to different sizes:
dpi=100
, mpl=blue, ds=white
blob.pl.render_points(element="blobs_points", size=400, color="blue").pl.render_points(element="blobs_points", size=400, color="white", method="datashader", alpha=1).pl.show(dpi=100)
dpi=200
, mpl=blue, ds=white
blob.pl.render_points(element="blobs_points", size=400, color="blue").pl.render_points(element="blobs_points", size=400, color="white", method="datashader", alpha=1).pl.show(dpi=200)
dpi=50
, ds=blue, mpl=white (note: colors and order swapped!)
blob.pl.render_points(element="blobs_points", size=400, color="blue", method="datashader", alpha=1).pl.render_points(element="blobs_points", size=400, color="white").pl.show(dpi=50)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working