Skip to content

Commit

Permalink
Merge pull request #15 from fusion-energy/removing_noise_from_log_plo…
Browse files Browse the repository at this point in the history
…t_zeros

imshow interpolation defaulting to none to remove noise
  • Loading branch information
shimwell authored Nov 30, 2023
2 parents 826f277 + ccd8db7 commit 7ffea38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/openmc_cylindrical_mesh_plotter/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7ffea38

Please sign in to comment.