How to export tf.shade() output img into a matrix of values?


I’m trying to customize my datashader heatmap visualization with x and y-axis labels, and colorbar labels, as well as add additional lines to the plot.

I thought one way to do this is if I should output the tf.shade() image into a matrix of values, which I plot using a heatmap in matplotlib.pyplot, and add additional customized labels and lines.

How do I do this? Or is there a better way to do this? I’m new to this so it’s possible I’m not looking at the right documentation.


I figured out the answer.

prior to the tf.shade() step is the ds.Canvas.points() step --> that outputs an xarray which can be used to extract values.