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

Skip to content

min/max_val not working in _scalar_arg_to_dict() #442

@maximelucas

Description

@maximelucas

Running

import xgi
from xgi.drawing.draw_utils import _scalar_arg_to_dict

H = xgi.random_hypergraph(5, ps=[0.5, 0.05])

_scalar_arg_to_dict(50, H.nodes, min_val=10, max_val=20)
# --> {0: 50, 1: 50, 2: 50, 3: 50, 4: 50}   # all values are 50 > 20, wrong!

As a consequence, the default settings in draw_nodes()

      "min_node_size": 10.0,
      "max_node_size": 30.0,
      "min_node_lw": 1.0,
      "max_node_lw": 5.0,

and all other default min/max settings going through _scalar_arg_to_dict are ignored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingviz

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions