iplotx 0.8.0__py3-none-any.whl → 0.9.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.
iplotx/__init__.py
CHANGED
|
@@ -9,19 +9,19 @@ library was used to construct the network.
|
|
|
9
9
|
from .version import __version__
|
|
10
10
|
from .plotting import (
|
|
11
11
|
network,
|
|
12
|
+
graph,
|
|
12
13
|
tree,
|
|
14
|
+
plot,
|
|
13
15
|
)
|
|
14
16
|
import iplotx.artists as artists
|
|
15
17
|
import iplotx.style as style
|
|
16
18
|
|
|
17
19
|
|
|
18
|
-
# Shortcut to iplotx.plotting.network
|
|
19
|
-
plot = network
|
|
20
|
-
|
|
21
20
|
__all__ = [
|
|
22
21
|
"network",
|
|
23
22
|
"tree",
|
|
24
23
|
"plot",
|
|
24
|
+
"graph",
|
|
25
25
|
"artists",
|
|
26
26
|
"style",
|
|
27
27
|
"__version__",
|
iplotx/plotting.py
CHANGED
|
@@ -22,6 +22,7 @@ def network(
|
|
|
22
22
|
layout: Optional[LayoutType] = None,
|
|
23
23
|
grouping: Optional[GroupingType] = None,
|
|
24
24
|
vertex_labels: Optional[list | dict | pd.Series | bool] = None,
|
|
25
|
+
node_labels: Optional[list | dict | pd.Series | bool] = None,
|
|
25
26
|
edge_labels: Optional[Sequence] = None,
|
|
26
27
|
ax: Optional[mpl.axes.Axes] = None,
|
|
27
28
|
style: str | dict | Sequence[str | dict] = (),
|
|
@@ -42,6 +43,9 @@ def network(
|
|
|
42
43
|
will be drawn. If a list, the labels are taken from the list. If a dict, the keys
|
|
43
44
|
should be the vertex IDs and the values should be the labels. If True (a single
|
|
44
45
|
bool value), the vertex IDs will be used as labels.
|
|
46
|
+
node_labels: Same meaning as vertex_labels. This is an alias to help users who prefer
|
|
47
|
+
the word "node" over "vertex". If both vertex_labels and node_labels are specified,
|
|
48
|
+
"node_labels" overrides "vertex_labels".
|
|
45
49
|
edge_labels: The labels for the edges. If None, no edge labels will be drawn. Defaults
|
|
46
50
|
to None.
|
|
47
51
|
ax: The axis to plot on. If None, a new figure and axis will be created. Defaults to
|
|
@@ -68,6 +72,11 @@ def network(
|
|
|
68
72
|
The list can have one or two elements, depending on whether you are requesting to
|
|
69
73
|
plot a network, a grouping, or both.
|
|
70
74
|
"""
|
|
75
|
+
# Equivalence of node_labels and vertex_labels
|
|
76
|
+
if node_labels is not None:
|
|
77
|
+
vertex_labels = node_labels
|
|
78
|
+
del node_labels
|
|
79
|
+
|
|
71
80
|
stylecontext = context(style, **kwargs) if style or kwargs else nullcontext()
|
|
72
81
|
|
|
73
82
|
with stylecontext:
|
|
@@ -126,11 +135,17 @@ def network(
|
|
|
126
135
|
return artists
|
|
127
136
|
|
|
128
137
|
|
|
138
|
+
# Aliases
|
|
139
|
+
plot = network
|
|
140
|
+
graph = network
|
|
141
|
+
|
|
142
|
+
|
|
129
143
|
def tree(
|
|
130
144
|
tree: Optional[TreeType] = None,
|
|
131
145
|
layout: str | LayoutType = "horizontal",
|
|
132
146
|
directed: bool | str = False,
|
|
133
147
|
vertex_labels: Optional[list | dict | pd.Series | bool] = None,
|
|
148
|
+
node_labels: Optional[list | dict | pd.Series | bool] = None,
|
|
134
149
|
leaf_labels: Optional[list | dict | pd.Series | bool] = None,
|
|
135
150
|
show_support: bool = False,
|
|
136
151
|
ax: Optional[mpl.axes.Axes] = None,
|
|
@@ -150,6 +165,9 @@ def tree(
|
|
|
150
165
|
directed: If False, do not draw arrows.
|
|
151
166
|
vertex_labels: The labels for the vertices. If None or False, no vertex labels. Also
|
|
152
167
|
read leaf_labels for leaf nodes.
|
|
168
|
+
node_labels: Same meaning as vertex_labels. This is an alias to help users who prefer
|
|
169
|
+
the word "node" over "vertex". If both vertex_labels and node_labels are specified,
|
|
170
|
+
"node_labels" overrides "vertex_labels".
|
|
153
171
|
leaf_labels: The labels for the leaf nodes. If None or False, no leaf labels are used
|
|
154
172
|
except if vertex_labels are specified for leaf nodes. This argument and the
|
|
155
173
|
previous vertex_labels provide somewhat redundant functionality but have quite
|
|
@@ -183,6 +201,11 @@ def tree(
|
|
|
183
201
|
Returns:
|
|
184
202
|
A TreeArtist object, set as a direct child of the matplotlib Axes.
|
|
185
203
|
"""
|
|
204
|
+
# Equivalence of node_labels and vertex_labels
|
|
205
|
+
if node_labels is not None:
|
|
206
|
+
vertex_labels = node_labels
|
|
207
|
+
del node_labels
|
|
208
|
+
|
|
186
209
|
stylecontext = context(style, **kwargs) if style or kwargs else nullcontext()
|
|
187
210
|
|
|
188
211
|
with stylecontext:
|
iplotx/version.py
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
iplotx/__init__.py,sha256=
|
|
1
|
+
iplotx/__init__.py,sha256=RzSct91jO8abrxOIn33rKEnDUgYpu1oj4olbObgX_hs,489
|
|
2
2
|
iplotx/artists.py,sha256=Bpn6NS8S_B_E4OW88JYW6aEu2bIuIQJmbs2paTmBAoY,522
|
|
3
3
|
iplotx/cascades.py,sha256=OPqF7Huls-HFmDA5MCF6DEZlUeRVaXsbQcHBoKAgNJs,8182
|
|
4
4
|
iplotx/groups.py,sha256=_9KdIiTAi1kXtd2mDywgBJCbqoRq2z-5fzOPf76Wgb8,6287
|
|
5
5
|
iplotx/label.py,sha256=6am3a0ejcW_bWEXSOODE1Ke3AyCU1lJ45RfnXNbHAQw,8923
|
|
6
6
|
iplotx/layout.py,sha256=KxmRLqjo8AYCBAmXez8rIiLU2sM34qhb6ox9AHYwRyE,4839
|
|
7
7
|
iplotx/network.py,sha256=SGmXXrFxqgOoQcEJSZdL3WiI6rHDlPOGg5loGPrYpDk,11688
|
|
8
|
-
iplotx/plotting.py,sha256=
|
|
8
|
+
iplotx/plotting.py,sha256=imlJZdx3S9B59TQPqrHEwQwJEnpI9SljthK34n3QJQY,11007
|
|
9
9
|
iplotx/tree.py,sha256=TxbNoBHS0CfswrcMIWCNtnOl_3e4-PwCrVo0goywC0U,28807
|
|
10
10
|
iplotx/typing.py,sha256=QLdzV358IiD1CFe88MVp0D77FSx5sSAVUmM_2WPPE8I,1463
|
|
11
|
-
iplotx/version.py,sha256=
|
|
11
|
+
iplotx/version.py,sha256=rlV8GqlJtRzwlHxPle9bW-H7xuYNreaGGD2bFrax930,66
|
|
12
12
|
iplotx/vertex.py,sha256=hqdlD9fRBSwH5bRvlpaaPu7jgUR4z9nob1SYfPWDxtI,14966
|
|
13
13
|
iplotx/edge/__init__.py,sha256=AVnLsrDWWCkix1LVhrjpWKEKDxOp8joM4tF6RqEHC8I,27115
|
|
14
14
|
iplotx/edge/arrow.py,sha256=ZKt3UNZ7XRa2S3KxpoQfd4q_6eSUHOS476BZNqlf2pw,16462
|
|
@@ -33,6 +33,6 @@ iplotx/utils/geometry.py,sha256=6RrC6qaB0-1vIk1LhGA4CfsiMd-9JNniSPyL_l9mshE,9245
|
|
|
33
33
|
iplotx/utils/internal.py,sha256=WWfcZDGK8Ut1y_tOHRGg9wSqY1bwSeLQO7dHM_8Tvwo,107
|
|
34
34
|
iplotx/utils/matplotlib.py,sha256=wELE73quQv10-1w9uA5eDTgkZkylJvjg7pd3K5tZPOo,6294
|
|
35
35
|
iplotx/utils/style.py,sha256=vyNP80nDYVinqm6_9ltCJCtjK35ZcGlHvOskNv3eQBc,4225
|
|
36
|
-
iplotx-0.
|
|
37
|
-
iplotx-0.
|
|
38
|
-
iplotx-0.
|
|
36
|
+
iplotx-0.9.0.dist-info/METADATA,sha256=HQtb9YO4hhXGn0K8gaXBIAerAu1Eu0b4QiIHWCIZv2c,4908
|
|
37
|
+
iplotx-0.9.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
38
|
+
iplotx-0.9.0.dist-info/RECORD,,
|
|
File without changes
|