Skip to content

Commit

Permalink
Fix van hove 3d plot.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Jun 27, 2024
1 parent 4277697 commit ca75866
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pymatgen/analysis/diffusion/aimd/tests/test_van_hove.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def test_van_hove(self):
self.assertAlmostEqual(vh.gdrt[10, 0], 9.68574868168, 10)
ax = vh.get_1d_plot()
assert isinstance(ax, mpl.axes.Axes)
ax = vh.get_3d_plot()
assert isinstance(ax, mpl.axes.Axes)


class RDFTest(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion pymatgen/analysis/diffusion/aimd/van_hove.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def get_3d_plot(self, figsize: tuple = (12, 8), mode: str = "distinct"):

labelsize = int(figsize[0] * 3)

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

0 comments on commit ca75866

Please sign in to comment.