I have an image that I want to rasterize and display at some non-default zoom level. I can accomplish this by setting the xlim and ylim on the plot. However, the result is a pixelated image because the pixel resolution was calculated on the full extents. As soon as I adjust the zoom on the plot, it will immediately recalculated the resolution to an appropriate level.
How can I get the initial display to calculate the resolution based on the extents I pass in and NOT the default extents of the image?
import holoviews as hv from holoviews import opts from holoviews.operation.datashader import rasterize hv.extension('bokeh') url = 'https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png' rasterize(hv.RGB.load_image(url)).opts(xlim=(0, 0.2), ylim=(0, 0.2))