Skip to content

Commit

Permalink
Merge pull request #4792 from chrishavlin/enfornce_dpi_in_show_mpl
Browse files Browse the repository at this point in the history
BUG: enforce Figure dpi in _show_mpl
  • Loading branch information
neutrinoceros authored Jan 26, 2024
2 parents dbe0965 + f1553d4 commit d5b3335
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yt/visualization/volume_rendering/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,9 @@ def _show_mpl(self, im, sigma_clip=None, dpi=100):
from matplotlib.figure import Figure

s = im.shape
self._render_figure = Figure(figsize=(s[1] / float(dpi), s[0] / float(dpi)))
self._render_figure = Figure(
figsize=(s[1] / float(dpi), s[0] / float(dpi)), dpi=dpi
)
self._render_figure.clf()
ax = self._render_figure.add_subplot(111)
ax.set_position([0, 0, 1, 1])
Expand Down

0 comments on commit d5b3335

Please sign in to comment.