-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
BUG: fix handling of color argument for variety of plotting functions #6956
Conversation
@@ -438,20 +439,23 @@ def normalize(series): | |||
return ax | |||
|
|||
|
|||
def andrews_curves(data, class_column, ax=None, samples=200, colormap=None, | |||
**kwds): | |||
def andrews_curves(frame, class_column, ax=None, samples=200, color=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if the deprecate_kwarg
decorator works for the change from data
to frame
? It may not since its a positional argument. If it doesn't you should change frame back to data since this would break code using andrews_curves(data=df, class_column='Name')
.
Thanks for the PR. I had those couple comments inline. Could you also add the note you have in Does this close a particular Github issue? I'll add this deprecation to #6581 when we merge. |
Also it doesn't look like Travis ran. You may need to hook it up to your Github account: http://about.travis-ci.org/docs/user/getting-started/ You should just have to sign in. |
I made the changes you suggested. A Travis build seemed to get launched once I pushed my commit but there we errors that seem unrelated to my changes. Do you have any suggestions on what might be the issue? Here is the build https://travis-ci.org/anomrake/pandas/builds/24206970 |
pls rebase to master. travis made some changes over the last couple of days, all fixed now. travis will automatically build on each commit. |
I tried to rebase but I'm new to this and I'm a bit surprised to see these other commits show up. Any help would be great. |
see here: https://github.com/pydata/pandas/wiki/Using-Git
then
|
Looks to have worked now. Thanks for the help. Also, as far as I know, there was no Github issue for the bugs. |
@@ -464,6 +464,14 @@ Deprecations | |||
returned if possible, otherwise a copy will be made. Previously the user could think that ``copy=False`` would | |||
ALWAYS return a view. (:issue:`6894`) | |||
|
|||
- The :func:`parallel_coordinates` function now takes argument ``color`` | |||
instead of ``colors``. A ``FutureWarning`` is raised to alert that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls move these to the Plotting sub-section
I made the change you requested |
if ax is None: | ||
ax = plt.gca(xlim=(-pi, pi)) | ||
for i in range(n): | ||
row = [columns[c][i] for c in range(len(columns))] | ||
row = df.irow(i).values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this the first time. I think we're deprecating irow
and icol
sometime. Could you change this to df.iloc[i].values
If you could rebase one last time and change those |
parallel_coordinates - fix reordering of class column (from set) causing possible color/class mismatch - deprecated use of argument colors in favor of color radviz - fix reordering of class column (from set) causing possible color/class mismatch - added explicit color keyword argument (avoids multiple values 'color' being passed to plotting method) andrews_curves - added explicit color keyword argument (avoids multiple values 'color' being passed to plotting method)
parallel_coordinates/andrews_curves - added deprecate_kwarg decorator for using frame argument instead of data - added tests to check that FutureWarning is raised properly
OK done |
BUG: fix handling of color argument for variety of plotting functions
Great, thanks! |
parallel_coordinates
mismatch
radviz
mismatch
passed to plotting method)
andrews_curves
passed to plotting method)
To recreate the bug:
parallel_coordinates before:

parallel_coordinates after:
