How to stop param.Image Warning?

Due to non-equidistant data on one axis, I’m getting this warning all the time:

WARNING:param.Image08903: Image dimension spectral is not evenly sampled to relative tolerance of 0.001. Please use the QuadMesh element for irregularly sampled data or set a higher tolerance on hv.config.image_rtol or the rtol parameter in the Image constructor.

I’d like to filter it, but the standard warning filtering doesn’t work for me?

Not like this:

        with warnings.catch_warnings():
            return self.xarray.hvplot(**kwargs)

and also not like this:

warnings.filterwarnings("ignore", "not evenly sampled to relative tolerance of 0.001.")

What can I do to filter these?

Doesn’t supplying a larger rtol as suggested in the message suppress the warning? In any case, if you have to supply a huge rtol, it’s really not appropriate to use Image for such data, as the spacing must be quite far from the uniform grid assumed by an Image. QuadMesh is what to use for irregularly sampled data.

In any case, if you do want to catch warnings like this (not recommended!!!), you can use the logging-module features described at Logging and Messages — param 1.12.0a2.post2+gd43d7f9 documentation .

Yes it does, so I guess it’s kinda moot to block the warning. Incidentally, I wanted to keep using the raster instead of quadmesh, because I get a very ugly aliasing effect using the quadmesh, maybe caused by some default gridlines being drawn? I will make a new topic here, as it isn’t related to this header much.