python - 无法在 matplotlib 中找到彩虹方法
问题描述
我使用matplotlib
的是 2.2.3,下面是我的代码
import matplotlib.pyplot as plt
"""Plot out the different clusters"""
# Choose a different colour for each cluster
colour = plt.cm.rainbow(np.linspace(0, 1, len(centroids)))
它会抛出找不到rainbow
参考
解决方案
推荐阅读
- quicksort - 一个元素被/可以选择多少次作为快速排序中的枢轴?
- html - 带按钮的数字输入
- android - 恐慌:缺少“x86”CPU 的模拟器引擎程序。窗户 10
- reactjs - 更改MongoDB自然顺序,手动生成_id并按_id排序,在两行之间插入行实现(React Data Grid)
- python-3.x - 如何控制seaborn barplot中的条形顺序
- android - RecyclerView setOnLongClickListener kotlin
- android - “com.swmansion.gesturehandler.react”错误出现
- java - 静态块和实例块之间的区别
- javascript - react js状态变量自动更新,无需setstate方法
- c++ - GCC 中的 TSan 报告 Clang 没有的错误