Skip to content

Commit

Permalink
Use plt.get_cmap instead of plt.colormaps
Browse files Browse the repository at this point in the history
  • Loading branch information
nicovank authored and sharkdp committed Apr 17, 2023
1 parent a3eee51 commit 7684efd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/plot_whisker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
times = [b["times"] for b in results]

boxplot = plt.boxplot(times, vert=True, patch_artist=True)
cmap = plt.colormaps["rainbow"]
cmap = plt.get_cmap("rainbow")
colors = [cmap(val / len(times)) for val in range(len(times))]

for patch, color in zip(boxplot["boxes"], colors):
Expand Down

0 comments on commit 7684efd

Please sign in to comment.