Control resolution of rasterized plots
See original GitHub issueI’m using ds.hvplot.quadmesh
to project and visualise a heatmap of geospatial data. Due to the size of the data, I have to set rasterize=True
. As far as I’m aware (and I may be wrong), the only way to control the spatial resolution of the rasterization process is to specify the height
and width
parameters in the arguments to the plotting function. This has the undesirable effect of making all the figure element (labels, bokeh widgets, etc) super small. It would be preferable if there were a way to control the downsampling process without changing the actual size of the plot. Is there something I’m missing or am I on to something? Cheers!
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Poor resolution of raster plot when output to file - Stack Overflow
I have a reasonably high definition global map raster and want to plot to file, but cannot seem to maintain resolution.
Read more >Rasterization for vector graphics - Matplotlib
Rasterization converts vector graphics into a raster image (pixels). ... The storage size and the resolution of the rasterized artist is determined by...
Read more >Things to consider when setting raster quality factor
The print resolution for raster images is determined by the Raster Quality factory property. Reducing the raster quality factor may be ...
Read more >How to perform point to raster operation and plot it with raster ...
What is the role of "resolution" in rasterize function? I think rasterize transfers points (or other spatial data) values to raster cells which ......
Read more >Resample (Data Management)—ArcGIS Pro | Documentation
Changes the spatial resolution of a raster dataset and sets rules for aggregating or interpolating values across the new pixel sizes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, this is a bit of a dilemma. 3 would save people time on searching through HoloViews documentation while adding some nice additional functionality (e.g. reducing resolution to send a plot over email, etc). Having to manually set the height and width of the underlying raster (e.g. through option 2 or 1) is a bit unintuitive for new users. The extra flexibility afforded by 1 would be useful too, though.
3 would get my main vote, but 1 would be a nice plus (with a link to the appropriate HoloViews documentation). I guess you would have to ensure users didn’t supply both
rasterize_factor
andrasterize_args={'height': ..., 'width': ...
at the same time though.The underlying
rasterize()
function provides those arguments, but I don’t think they are exposed in hvPlot. To get around that, you can try code like this sketch: