kip-hart / MicroStructPy

Microstructure modeling, mesh generation, analysis, and visualization.
https://docs.microstructpy.org
MIT License
68 stars 19 forks source link

matplotlib 3.4 hotfix #89

Closed kip-hart closed 10 months ago

kip-hart commented 10 months ago

PR Summary

Purpose

This PR addresses deprecated behavior to matplotlib functions in release 3.4. What's new in Matplotlib 3.4.0 (Mar 26, 2021)

It also replaces custom 3D axis equal code with standard aspect ratio functions from matplotlib.

Approach

Where plt.gca(**kwargs) was used previously, now the code uses plt.gcf().add_subplot(**kwargs). There is an if statement to catch whether axes already exist, which avoids generating multiple plots for objects that should be plotted together.

Closing Issues

Fixes #88 Closes #81, #83, #87