-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added edge_ec
argument in draw
to specify edge colors
#575
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #575 +/- ##
==========================================
+ Coverage 92.51% 93.13% +0.62%
==========================================
Files 59 60 +1
Lines 4393 4503 +110
==========================================
+ Hits 4064 4194 +130
+ Misses 329 309 -20 ☔ View full report in Codecov by Sentry. |
… still had old plotting defaults
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Two minor comments, but good to merge when you're ready. If you merge today, I can release 0.8.9 in time for your presentation.
@@ -103,8 +103,8 @@ def _parse_color_arg(colors, ids, id_kind="edges"): | |||
-------- | |||
colors : single color or ndarray | |||
Processed color values for plotting. | |||
colors_are_mapped : bool | |||
True if the colors are mapped and need special handling. This | |||
colors_to_map : bool |
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 this just be called map_colors
?
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.
Yea that would work too I guess, but the colors are only mapped later in the draw function
This should fix #537
Excepted usage is mostly when using
draw()
withhull=True
and white facecolors for edges withedge_fc="white"
.Colors can be specified in all usual formats (same as
edge_fc
).Technical trick: matplotlib does not automatically map numeric values to colors for
edgecolors
inPatchCollection
so I had to map them manually with aScalarMappable
. Thevmin
,vmax
; andcmap
used for the mapping are the same as those fromedge_fc
.