From 5420e901364090346f3174e7125ba155eb568bc2 Mon Sep 17 00:00:00 2001 From: Rhys Goodall Date: Thu, 24 Jun 2021 17:56:59 +0100 Subject: [PATCH] fix: update matplotlib 3daxes to use modern api. --- pymatgen/analysis/phase_diagram.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pymatgen/analysis/phase_diagram.py b/pymatgen/analysis/phase_diagram.py index a679c1fc395..60363431c80 100644 --- a/pymatgen/analysis/phase_diagram.py +++ b/pymatgen/analysis/phase_diagram.py @@ -2056,11 +2056,10 @@ def _get_3d_plot(self, label_stable=True): machines have matplotlib installed, I have done it this way. """ import matplotlib.pyplot as plt - import mpl_toolkits.mplot3d.axes3d as p3 from matplotlib.font_manager import FontProperties fig = plt.figure() - ax = p3.Axes3D(fig) + ax = fig.add_subplot(111, projection="3d") font = FontProperties(weight="bold", size=13) (lines, labels, unstable) = self.pd_plot_data count = 1