MNT Use name instead of float to specify colors#12199
Merged
ogrisel merged 3 commits intoscikit-learn:masterfrom Oct 1, 2018
qinhanmin2014:circleci-failure
Merged
MNT Use name instead of float to specify colors#12199ogrisel merged 3 commits intoscikit-learn:masterfrom qinhanmin2014:circleci-failure
ogrisel merged 3 commits intoscikit-learn:masterfrom
qinhanmin2014:circleci-failure
Conversation
ogrisel
approved these changes
Sep 29, 2018
Member
There was a problem hiding this comment.
I think the fix looks good to me:
c=is meant to pass numerical values to be mapped to a color according to a color map;color=on the other hand is mean to pass a uniform color specifier.
|
|
||
| ax.plot(X_test, clf.predict(X_test), color='.5') | ||
| ax.scatter(this_X, y_train, s=3, c='.5', marker='o', zorder=10) | ||
| ax.scatter(this_X, y_train, s=3, color='.5', marker='o', zorder=10) |
Member
There was a problem hiding this comment.
I think color='gray' would be more explicit.
| 8000 clf.fit(X_train, y_train) | ||
| ax.plot(X_test, clf.predict(X_test), linewidth=2, color='blue') | ||
| ax.scatter(X_train, y_train, s=30, c='r', marker='+', zorder=10) | ||
| ax.scatter(X_train, y_train, s=30, color='r', marker='+', zorder=10) |
Member
There was a problem hiding this comment.
I think color='red' would be more explicit.
Member
Author
Member
|
Let's merge. I still think that using |
Member
Author
Thanks. I've opened #12224 to further improve the plot (including the title & axis) and this can serve as part of that issue, but AFAIK |
jnothman
pushed a commit
to jnothman/scikit-learn
that referenced
this pull request
Oct 15, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FIxes #12191
I guess this is reasonable, but would definitely welcome better solution from someone more familiar with matplotlib colors