-
-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matplotlib.cm.spectral no longer exists #10761
Labels
Comments
jnothman
added
Documentation
good first issue
Easy with clear instructions to resolve
help wanted
labels
Mar 7, 2018
From the CircleCI logs: Unexpected failing examples:
/home/circleci/project/examples/cluster/plot_coin_segmentation.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_coin_segmentation.py", line 75, in <module>
colors=[plt.cm.spectral(l / float(N_REGIONS))])
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/cluster/plot_kmeans_silhouette_analysis.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_kmeans_silhouette_analysis.py", line 98, in <module>
color = cm.spectral(float(i) / n_clusters)
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/cluster/plot_digits_agglomeration.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_digits_agglomeration.py", line 57, in <module>
interpolation='nearest', cmap=plt.cm.spectral)
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/decomposition/plot_pca_iris.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/decomposition/plot_pca_iris.py", line 53, in <module>
ax.scatter(X[:, 0], X[:, 1], X[:, 2], c=y, cmap=plt.cm.spectral,
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/cluster/plot_digits_linkage.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_digits_linkage.py", line 90, in <module>
plot_clustering(X_red, X, clustering.labels_, "%s linkage" % linkage)
File "/home/circleci/project/examples/cluster/plot_digits_linkage.py", line 66, in plot_clustering
color=plt.cm.spectral(labels[i] / 10.),
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/cluster/plot_agglomerative_clustering.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_agglomerative_clustering.py", line 68, in <module>
cmap=plt.cm.spectral)
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/cluster/plot_kmeans_stability_low_dim_dense.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_kmeans_stability_low_dim_dense.py", line 111, in <module>
color = cm.spectral(float(k) / n_clusters, 1)
AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
/home/circleci/project/examples/cluster/plot_coin_ward_segmentation.py failed leaving traceback:
Traceback (most recent call last):
File "/home/circleci/project/examples/cluster/plot_coin_ward_segmentation.py", line 66, in <module>
colors=[plt.cm.spectral(l / float(n_clusters)), ])
AttributeError: module 'matplotlib.cm' has no attribute 'spectral' |
I am also facing issue with the following PCA example: http://scikit-learn.org/stable/auto_examples/decomposition/plot_pca_iris.html |
Sorry we have been slow to release |
You can do this: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
It was a deprecated alias for nipy_spectral (see matplotlib/matplotlib#7416). It seems to have been removed in the last release of matplotlib (2.2.0), causing some of our examples to fail.
The text was updated successfully, but these errors were encountered: