From ccd8db7cf75a8c7e34f7ca5de636e01906dc9f71 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 30 Nov 2023 10:15:31 +0000 Subject: [PATCH] {"interpolation defaulting to none --- src/openmc_cylindrical_mesh_plotter/core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/openmc_cylindrical_mesh_plotter/core.py b/src/openmc_cylindrical_mesh_plotter/core.py index 7d299fe..c5a2f3a 100644 --- a/src/openmc_cylindrical_mesh_plotter/core.py +++ b/src/openmc_cylindrical_mesh_plotter/core.py @@ -159,7 +159,11 @@ def plot_mesh_tally_rz_slice( axes.set_xlabel(xlabel) axes.set_ylabel(ylabel) - im = axes.imshow(data, extent=(x_min, x_max, y_min, y_max), **kwargs) + # zero values with logscale produce noise / fuzzy on the time but setting interpolation to none solves this + default_imshow_kwargs = {"interpolation": "none"} + default_imshow_kwargs.update(kwargs) + + im = axes.imshow(data, extent=(x_min, x_max, y_min, y_max), **default_imshow_kwargs) if colorbar: fig.colorbar(im, **colorbar_kwargs)