Skip to content

Commit ca75866

Browse files
committed
Fix van hove 3d plot.
1 parent 4277697 commit ca75866

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pymatgen/analysis/diffusion/aimd/tests/test_van_hove.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def test_van_hove(self):
4343
self.assertAlmostEqual(vh.gdrt[10, 0], 9.68574868168, 10)
4444
ax = vh.get_1d_plot()
4545
assert isinstance(ax, mpl.axes.Axes)
46+
ax = vh.get_3d_plot()
47+
assert isinstance(ax, mpl.axes.Axes)
4648

4749

4850
class RDFTest(unittest.TestCase):

pymatgen/analysis/diffusion/aimd/van_hove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def get_3d_plot(self, figsize: tuple = (12, 8), mode: str = "distinct"):
237237

238238
labelsize = int(figsize[0] * 3)
239239

240-
ax.pcolor(X, Y, grt, cmap="jet", vmin=grt.min(), vmax=vmax)
240+
plt.pcolor(X, Y, grt, cmap="jet", vmin=grt.min(), vmax=vmax)
241241
ax.set_xlabel("Time (ps)", size=labelsize)
242242
ax.set_ylabel(r"$r$ ($\AA$)", size=labelsize)
243243
ax.axis([x.min(), x.max(), y.min(), y.max()])

0 commit comments

Comments
 (0)