mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 09:01:25 +00:00
Fix get_cmap MatplotlibDeprecationWarning
This commit is contained in:
1 parent
ccda6c4712
commit
a3eee514ed
1 file changed
+1
-1
@@ -34,7 +34,7 @@ else:
|
|||||||
times = [b["times"] for b in results]
|
times = [b["times"] for b in results]
|
||||||
|
|
||||||
boxplot = plt.boxplot(times, vert=True, patch_artist=True)
|
boxplot = plt.boxplot(times, vert=True, patch_artist=True)
|
||||||
cmap = plt.cm.get_cmap("rainbow")
|
cmap = plt.colormaps["rainbow"]
|
||||||
colors = [cmap(val / len(times)) for val in range(len(times))]
|
colors = [cmap(val / len(times)) for val in range(len(times))]
|
||||||
|
|
||||||
for patch, color in zip(boxplot["boxes"], colors):
|
for patch, color in zip(boxplot["boxes"], colors):
|
||||||
|
|||||||
Reference in new issue
Block a user