Skip to content

Commit

Permalink
Replace deprecated ax.dist with ax.set_box_aspect
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Sep 5, 2024
1 parent 5033d4d commit 8784fe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rhodium/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 8784fe0

Please sign in to comment.