Skip to content

Commit

Permalink
Merge 7b1eae2 into 7c68f71
Browse files Browse the repository at this point in the history
  • Loading branch information
hakonanes committed Sep 10, 2021
2 parents 7c68f71 + 7b1eae2 commit 17cffcf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.rst
Expand Up @@ -21,7 +21,9 @@ Contributors

Changed
-------
- Restricted lowest supported version of orix to >= 0.7.
- Add gnomonic circles as patches in axes returned from EBSDDetector.plot()
(`#445 <https://github.com/pyxem/kikuchipy/pull/445>`_)
Restricted lowest supported version of orix to >= 0.7.
(`#444 <https://github.com/pyxem/kikuchipy/pull/444>`_)

0.5.1 (2021-09-01)
Expand Down
2 changes: 1 addition & 1 deletion kikuchipy/detectors/ebsd_detector.py
Expand Up @@ -554,7 +554,7 @@ def plot(
if gnomonic_angles is None:
gnomonic_angles = np.arange(1, 9) * 10
for angle in gnomonic_angles:
ax.add_artist(
ax.add_patch(
plt.Circle(
(pcx, pcy), np.tan(np.deg2rad(angle)), **gnomonic_circles_kwargs
)
Expand Down
4 changes: 2 additions & 2 deletions kikuchipy/detectors/tests/test_ebsd_detector.py
Expand Up @@ -381,12 +381,12 @@ def test_plot_detector_gnomonic_circles(
n_angles = 8
else:
n_angles = len(gnomonic_angles)
assert len(ax.artists) == n_angles
assert len(ax.patches) == n_angles
if gnomonic_circles_kwargs is None:
edgecolor = "k"
else:
edgecolor = gnomonic_circles_kwargs["edgecolor"]
assert np.allclose(ax.artists[0]._edgecolor[:3], mcolors.to_rgb(edgecolor))
assert np.allclose(ax.patches[0]._edgecolor[:3], mcolors.to_rgb(edgecolor))
plt.close("all")

@pytest.mark.parametrize("pattern", [np.ones((61, 61)), np.ones((59, 60))])
Expand Down

0 comments on commit 17cffcf

Please sign in to comment.