Skip to content

Commit

Permalink
Fix typo and formatting in reg.plot_layer_quality function (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yu-AnChen authored May 12, 2021
1 parent 1b590fe commit f73a8fd
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ashlar/reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,8 +1407,8 @@ def plot_layer_quality(
positions, centers, shifts = aligner.positions, aligner.centers, aligner.shifts

if scale != 1.0:
h, w, positions, centers, shifts = [scale * i
for i in [h, w, positions, centers, shifts]
h, w, positions, centers, shifts = [
scale * i for i in [h, w, positions, centers, shifts]
]

# Bounding boxes denoting new tile positions.
Expand All @@ -1422,11 +1422,11 @@ def plot_layer_quality(
)
ax.add_patch(rect)

# Annotate tile numbering
# Annotate tile numbering.
if annotate:
for idx, (x, y) in enumerate(np.fliplr(positions)):
text = plt.annotate(str(idx), (x+0.1*w, y+0.9*h), alpha=0.7)
# add outline to text for better contract in different background color
# Add outline to text for better contrast in different background color.
text_outline = mpatheffects.Stroke(linewidth=1, foreground='#AAA')
text.set_path_effects(
[text_outline, mpatheffects.Normal()]
Expand All @@ -1435,8 +1435,7 @@ def plot_layer_quality(
if artist == 'quiver':
ax.quiver(
*centers.T[::-1], *shifts.T[::-1], aligner.discard,
units='dots', width=2,
scale=1, scale_units='xy', angles='xy',
units='dots', width=2, scale=1, scale_units='xy', angles='xy',
cmap='Greys'
)
if artist == 'patches':
Expand Down

0 comments on commit f73a8fd

Please sign in to comment.