-
Notifications
You must be signed in to change notification settings - Fork 18
Fix edgecolor not set on scatter plots with single-row DataFrame data #325
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
Conversation
|
@cvanelteren 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
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.
Copilot wasn't able to review any files in this pull request.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…function Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com>
Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com>
|
@copilot the test needs to be marked with `pytest.mark.mpl_image_compare |
|
@copilot ensure the code is formatted with black |
…_single_row Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com>
Co-authored-by: cvanelteren <19485143+cvanelteren@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@copilot can you fix the title alignment in another PR? |
I'd be happy to help with title alignment issues. Could you provide more details about:
Once I understand the specific issue, I can create a separate PR to address it. |
|
@copilot the original author of the issue stated that the alignment is not working for suptitle, see the description of the original issue above. |
I don't see any mention of suptitle alignment issues in the problem statement provided above. The current issue description only covers the edgecolor problem with scatter plots. Could you provide more details about the suptitle alignment issue, or point me to where it's described? I'd be happy to create a separate PR to fix suptitle alignment once I understand the specific problem. |
|
@copilot you did not do the last task please do it |
The
edgecolorparameter was being ignored for scatter plots when using single-row DataFrame data combined with thealphaparameter. This resulted in unexpected black edges appearing instead of the specified edge color.Problem
Root Cause
The issue was in the
_from_datafunction inultraplot/internals/inputs.py. This function processes DataFrame column lookups but was incorrectly converting scalar string values like"none"to lists["none"]even when the string was not found in the DataFrame.When matplotlib receives:
edgecolors='none'→ correctly renders no edgesedgecolors=['none']→ treats it as a color array, causing inconsistent behaviorSolution
Modified
_from_datato preserve scalar values when they are not found in the DataFrame columns. The fix:Testing
test_scatter_edgecolor_single_rowto prevent future issuesFixes #324.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.