Skip to content

Commit 454c8f2

Browse files
committed
Fix error caused by different number of ticks and tick labels
1 parent ad17d24 commit 454c8f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pysteps/verification/plots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def plot_rankhist(rankhist, ax=None):
103103
ax.bar(x, r, width=1.0 / len(x), align="edge", color="gray", edgecolor="black")
104104

105105
ax.set_xticks(x[::3] + (x[1] - x[0]))
106-
ax.set_xticklabels(np.arange(1, len(x))[::3])
106+
ax.set_xticklabels(np.arange(1, len(x) + 1)[::3])
107107
ax.set_xlim(0, 1 + 1.0 / len(x))
108108
ax.set_ylim(0, np.max(r) * 1.25)
109109

0 commit comments

Comments
 (0)