Skip to content

Change the way alpha is processed #673

@nwlandry

Description

@nwlandry

As of right now, edge colors are not handled correctly in draw. If a user does

xgi.draw(H, edge_fc=(0, 0, 0, 0.2), alpha=0.4, edge_ec=(0, 0, 0, 1))

then alpha will override both values. The reason for this is that we are attempting to leverage the PatchCollection alpha keyword, which does not offer per-edge flexibility. I propose that we remove the alpha keyword, and have some logic in place for making the default alpha values of edge_fc and edge_ec be 0.4 and 1 respectively, but that individually specified alpha values will override these defaults.

I think that we can handle this by converting everything to a 4-tuple before passing it to PatchCollection and removing the alpha keyword.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions