From 8784fe08cfa1ee37968bed8cc63a329acbe38213 Mon Sep 17 00:00:00 2001 From: David Hadka Date: Thu, 5 Sep 2024 15:48:40 +0000 Subject: [PATCH] Replace deprecated ax.dist with ax.set_box_aspect --- rhodium/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rhodium/plot.py b/rhodium/plot.py index 713b893..d5c4873 100644 --- a/rhodium/plot.py +++ b/rhodium/plot.py @@ -689,7 +689,7 @@ def animate3d(prefix, dir="images/", steps=36, transform=(10, 0, 0), **kwargs): else: ax.azim += transform[0] ax.elev += transform[1] - # ax.dist += transform[2] # This is deprecated, use ax.set_box_aspect(None, zoom=2) instead + ax.set_box_aspect(None, zoom=transform[2] if transform[2] > 0 else 1) filename = os.path.join(base_dir, 'img' + str(n).zfill(digits) + '.png') plt.savefig(filename, bbox_inches='tight')