howso-visuals 2.3.0__py3-none-any.whl → 2.4.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- howso/visuals/graph.py +7 -3
- {howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/METADATA +1 -1
- {howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/RECORD +7 -7
- {howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/WHEEL +0 -0
- {howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/licenses/LICENSE-3RD-PARTY.txt +0 -0
- {howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/licenses/LICENSE.txt +0 -0
- {howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/top_level.txt +0 -0
howso/visuals/graph.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from collections.abc import Callable, Collection, Mapping
|
|
1
|
+
from collections.abc import Callable, Collection, Mapping, Sequence
|
|
2
2
|
from typing import Any, SupportsInt, TypeAlias
|
|
3
3
|
|
|
4
4
|
import networkx as nx
|
|
@@ -111,6 +111,7 @@ def _create_edge_annotations(
|
|
|
111
111
|
def plot_graph(
|
|
112
112
|
G: nx.Graph, # noqa: N803
|
|
113
113
|
*,
|
|
114
|
+
colorscale: str | Sequence[tuple[float, str]] = "Bluered_r",
|
|
114
115
|
cscale_tuple: tuple[float, float, float] = None,
|
|
115
116
|
edge_attr_sigfigs: SupportsInt | None = 4,
|
|
116
117
|
edge_attr: str | None = None,
|
|
@@ -129,8 +130,11 @@ def plot_graph(
|
|
|
129
130
|
----------
|
|
130
131
|
G : nx.Graph
|
|
131
132
|
The graph to plot.
|
|
133
|
+
colorscale : str | Sequence[tuple[float, str]], default "Bluered_r"
|
|
134
|
+
The colorscale to use when plotting nodes using ``node_color``. Defaults to `Plotly`'s reversed "Bluered"
|
|
135
|
+
colorscale.
|
|
132
136
|
cscale_tuple : tuple[float, float, float], optional
|
|
133
|
-
The tuple of values to use for the colorscale. If None, (3, 15, 30) will be used.
|
|
137
|
+
The tuple of values (``cmin``, ``cmid``, ``cmax``) to use for the colorscale. If None, ``(3, 15, 30)`` will be used.
|
|
134
138
|
edge_attr : str, optional
|
|
135
139
|
The name of the edge attribute to use when scaling the size of the edges. This should
|
|
136
140
|
be an attribute that is contained within ``G``.
|
|
@@ -230,7 +234,7 @@ def plot_graph(
|
|
|
230
234
|
|
|
231
235
|
fig.update_layout(
|
|
232
236
|
coloraxis=dict(
|
|
233
|
-
colorscale=
|
|
237
|
+
colorscale=colorscale,
|
|
234
238
|
cmin=cbot,
|
|
235
239
|
cmid=cmid,
|
|
236
240
|
cmax=cmax,
|
|
@@ -8,15 +8,15 @@ config/powershell/Download-Tzdata.ps1,sha256=uGNszw3t3quz1ClN3PWlPr4cKMar9KxxFf4
|
|
|
8
8
|
config/powershell/Helper-Functions.ps1,sha256=oLEunSYLr-zxtG9kqYuOGG8v3kSxTQEpqeERWQ4jC8I,990
|
|
9
9
|
howso/visuals/__init__.py,sha256=OL9LT4186YIXkEmM4qc21maRnfrtxBmFUHnalcKzGWA,507
|
|
10
10
|
howso/visuals/colors.py,sha256=2ChjT4MUjA4ZqITR_K1j3fUKNRBd8M9iyJ4ZT10cNlw,1709
|
|
11
|
-
howso/visuals/graph.py,sha256=
|
|
11
|
+
howso/visuals/graph.py,sha256=ghdUmG3NHGrNDo5p85k0A19rH6DdAFd-mXw06-xgwbU,8369
|
|
12
12
|
howso/visuals/visuals.py,sha256=ZW6hDabf-nQJZ5ZZ4yMC2vStJxk8cBwAkVxl5Dz1Hvc,30419
|
|
13
13
|
howso/visuals/data/iris.csv,sha256=73iTb6rB42LgZwf89er-tEbuyjlvEAx6WywMPwt0GjU,2757
|
|
14
14
|
howso/visuals/tests/conftest.py,sha256=BcvCVDWbwaQKSstzJzN9G48KoDnCgTtVdgYo2CJZTWM,1293
|
|
15
15
|
howso/visuals/tests/test_graph.py,sha256=gfuJNpsNBLx2tDXDIR-ClbCZUSOQCmk8Dx2X-NhN2yM,1014
|
|
16
16
|
howso/visuals/tests/test_plot.py,sha256=lOYYUty84LFFdaQCDcw-fMAicTqlHIwvNtuVch0RIEE,8121
|
|
17
|
-
howso_visuals-2.
|
|
18
|
-
howso_visuals-2.
|
|
19
|
-
howso_visuals-2.
|
|
20
|
-
howso_visuals-2.
|
|
21
|
-
howso_visuals-2.
|
|
22
|
-
howso_visuals-2.
|
|
17
|
+
howso_visuals-2.4.0.dist-info/licenses/LICENSE-3RD-PARTY.txt,sha256=gQCRczb39so1uukj3mR5BYytgO87owXzfLkgjfDau-U,370555
|
|
18
|
+
howso_visuals-2.4.0.dist-info/licenses/LICENSE.txt,sha256=2xqHuoHohba7gpcZZKtOICRjzeKsQANXG8WoV9V35KM,33893
|
|
19
|
+
howso_visuals-2.4.0.dist-info/METADATA,sha256=oc3B6SU3jF5AQC5T1Jln6YTEz1FLilLLkRV5wNtmD2s,41051
|
|
20
|
+
howso_visuals-2.4.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
howso_visuals-2.4.0.dist-info/top_level.txt,sha256=4ltSHx7mNsXczuoCPkz1irjq1x1JZir2QrX-ZwRNWXU,22
|
|
22
|
+
howso_visuals-2.4.0.dist-info/RECORD,,
|
|
File without changes
|
{howso_visuals-2.3.0.dist-info → howso_visuals-2.4.0.dist-info}/licenses/LICENSE-3RD-PARTY.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|