Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Warning when specifying node colors #499

@nwlandry

Description

@nwlandry

A minimal working example is

import xgi
import random

H = xgi.Hypergraph([[1, 2], [2, 3, 4]])

c1 = "maroon"
c2 = "white"
node_fc = [c1 if random.random() < 0.5 else c2 for i in H.nodes]
xgi.draw(H, node_fc=node_fc)

produces this warning

UserWarning: No data for colormapping provided via 'c'. Parameters 'cmap' will be ignored
  node_collection = ax.scatter(

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions