Spaces:
Sleeping
Sleeping
Fix bug in plot of single head
Browse files- hexviz/plot.py +4 -2
hexviz/plot.py
CHANGED
@@ -65,11 +65,13 @@ def plot_single_heatmap(
|
|
65 |
MaxNLocator(integer=True, steps=[1, 2, 5], prune="both", nbins=max_labels)
|
66 |
)
|
67 |
|
|
|
|
|
68 |
ax.set_xticklabels(
|
69 |
-
np.arange(slice_start, slice_end + 1)[
|
70 |
)
|
71 |
ax.set_yticklabels(
|
72 |
-
np.arange(slice_start, slice_end + 1)[
|
73 |
)
|
74 |
|
75 |
# Set the x and y axis minor ticks
|
|
|
65 |
MaxNLocator(integer=True, steps=[1, 2, 5], prune="both", nbins=max_labels)
|
66 |
)
|
67 |
|
68 |
+
tick_indices_x = np.clip((ax.get_xticks()).astype(int), 0, slice_end - slice_start)
|
69 |
+
tick_indices_y = np.clip((ax.get_yticks()).astype(int), 0, slice_end - slice_start)
|
70 |
ax.set_xticklabels(
|
71 |
+
np.arange(slice_start, slice_end + 1)[tick_indices_x], fontsize=8
|
72 |
)
|
73 |
ax.set_yticklabels(
|
74 |
+
np.arange(slice_start, slice_end + 1)[tick_indices_y], fontsize=8
|
75 |
)
|
76 |
|
77 |
# Set the x and y axis minor ticks
|