Skip to content

Commit

Permalink
BugFix: Fix labels for miller indices, with rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
CSSFrancis committed Feb 1, 2024
1 parent c5f2317 commit c65d4b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions diffsims/simulations/simulation2d.py
Expand Up @@ -506,9 +506,9 @@ def plot(
ax.set_ylim(-self.reciporical_radius, self.reciporical_radius)

if show_labels:
millers = np.matmul(coords.hkl, self.get_current_rotation()).astype(
np.int16
)
millers = np.round(
np.matmul(coords.hkl, self.get_current_rotation())
).astype(np.int16)
# only label the points inside the axes
xlim = ax.get_xlim()
ylim = ax.get_ylim()
Expand Down

0 comments on commit c65d4b2

Please sign in to comment.