Hey,
I’m working on some improvements for using datashader with EOmaps, and I’ve noticed that “mode” aggregation is only possible for “rasters”… however I could not find any indication on how to tell datashader that the data should be identified as a raster when using mpl_ext.dsshow(...)
.
From what I’ve found so far, “raster”-aggregation should work something like this:
cvs = ds.Canvas(plot_width=1000, plot_height=1000)
agg = cvs.raster(<xarray.Dataset>, agg="mode")
agg.compute()
however within mpl_ext.dsshow()
the canvas is used like this:
def aggregate(self, x_range, y_range):
"""Aggregate data in given range to the window dimensions."""
dims = self.axes.patch.get_window_extent().bounds
if self.plot_width is None:
plot_width = int(int(dims[2] + 0.5) * self.width_scale)
else:
plot_width = self.plot_width
if self.plot_height is None:
plot_height = int(int(dims[3] + 0.5) * self.height_scale)
else:
plot_height = self.plot_height
canvas = Canvas(
plot_width=plot_width,
plot_height=plot_height,
x_range=x_range,
y_range=y_range,
)
binned = bypixel(self.df, canvas, self.glyph, self.aggregator)
return binned
… and so I have no clue on how I could tell bypixel
that I’d like raster-aggregation…
any help on this is highly appreciated…