-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Figure 2.38 - UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored #168
Comments
Am also working thru the scripts in chapter 2 using Jupyter Lab in Windows 11. Tried numerous various but couldn't solve the cmap problem so I rewrote it using scatter3D. This works: import numpy as np X_new = np.hstack([X, X[:, 1:] ** 2]) ax = plt.figure().add_subplot(projection='3d') mask = y == 0 ax.scatter3D(X_new[mask, 0], X_new[mask, 1], X_new[mask, 2], c='b', s=60, edgecolor='k') Script [77] has the same problem. If you run these sequentially in Jupyter do not need the first three lines. This works: linear_svm_3d = LinearSVC().fit(X_new, y) ax = plt.figure().add_subplot(projection='3d') XX, YY = np.meshgrid(xx, yy) ax.set_xlabel("feature0") |
Legend thankyou |
thx for the solution |
您的邮件已收到,我将会尽快处理,谢谢。王宇凝
|
1 similar comment
您的邮件已收到,我将会尽快处理,谢谢。王宇凝
|
you, my friend, hero! |
in chapter 2
the In[76]
does not produce a graph - and i get this Warning
UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
The text was updated successfully, but these errors were encountered: