Skip to content

Commit 9984a8a

Browse files
committed
fix: font_size: int -> font_size: float
1 parent 380b608 commit 9984a8a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

dhg/visualization/structure/defaults.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def default_size(
6767
v_size: Union[float, list] = 1.0,
6868
v_line_width: Union[float, list] = 1.0,
6969
e_line_width: Union[float, list] = 1.0,
70-
font_size: int = 1.0,
70+
font_size: float = 1.0,
7171
):
7272
_v_size = 1 / np.sqrt(num_v + 10) * 0.1
7373
_v_line_width = 1 * np.exp(-num_v / 50)
@@ -91,8 +91,8 @@ def default_bipartite_size(
9191
v_size: Union[float, list] = 1.0,
9292
v_line_width: Union[float, list] = 1.0,
9393
e_line_width: Union[float, list] = 1.0,
94-
u_font_size: int = 1.0,
95-
v_font_size: int = 1.0,
94+
u_font_size: float = 1.0,
95+
v_font_size: float = 1.0,
9696
):
9797
_u_size = 1 / np.sqrt(num_u + 12) * 0.08
9898
_u_line_width = 1 * np.exp(-num_u / 50)

dhg/visualization/structure/draw.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def draw_graph(
3030
e_color: Union[str, list] = "gray",
3131
e_fill_color: Union[str, list] = "whitesmoke",
3232
e_line_width: Union[str, list] = 1.0,
33-
font_size: int = 1.0,
33+
font_size: float = 1.0,
3434
font_family: str = "sans-serif",
3535
push_v_strength: float = 1.0,
3636
push_e_strength: float = 1.0,
@@ -98,14 +98,14 @@ def draw_digraph(
9898
v_line_width: Union[str, list] = 1.0,
9999
e_color: Union[str, list] = "gray",
100100
e_line_width: Union[str, list] = 1.0,
101-
font_size: int = 1.0,
101+
font_size: float = 1.0,
102102
font_family: str = "sans-serif",
103103
push_v_strength: float = 1.0,
104104
push_e_strength: float = 1.0,
105105
pull_e_strength: float = 1.0,
106106
pull_center_strength: float = 1.0,
107107
):
108-
r"""Draw the directed graph structure.
108+
r"""Draw the directed graph structure.
109109
110110
Args:
111111
``g`` (``dhg.DiGraph``): The DHG's directed graph object.
@@ -178,7 +178,7 @@ def draw_bigraph(
178178
pull_v_center_strength: float = 1.0,
179179
):
180180
r"""Draw the bipartite graph structure.
181-
181+
182182
Args:
183183
``g`` (``dhg.BiGraph``): The DHG's bipartite graph object.
184184
``e_style`` (``str``): The edge style. The supported edge styles are only ``'line'``. Defaults to ``'line'``.
@@ -287,7 +287,7 @@ def draw_hypergraph(
287287
pull_center_strength: float = 1.0,
288288
):
289289
r"""Draw the hypergraph structure.
290-
290+
291291
Args:
292292
``hg`` (``dhg.Hypergraph``): The DHG's hypergraph object.
293293
``e_style`` (``str``): The style of hyperedges. The available styles are only ``'circle'``. Defaults to ``'circle'``.

0 commit comments

Comments
 (0)