iplotx 0.3.1__py3-none-any.whl → 0.5.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 +5 -0
- iplotx/artists.py +24 -0
- iplotx/cascades.py +22 -31
- iplotx/edge/__init__.py +122 -49
- iplotx/edge/arrow.py +44 -3
- iplotx/edge/geometry.py +30 -21
- iplotx/edge/leaf.py +117 -0
- iplotx/edge/ports.py +3 -2
- iplotx/groups.py +1 -3
- iplotx/ingest/__init__.py +6 -20
- iplotx/ingest/heuristics.py +4 -36
- iplotx/ingest/providers/network/igraph.py +20 -18
- iplotx/ingest/providers/network/networkx.py +20 -24
- iplotx/ingest/providers/network/simple.py +114 -0
- iplotx/ingest/providers/tree/biopython.py +15 -5
- iplotx/ingest/providers/tree/cogent3.py +9 -5
- iplotx/ingest/providers/tree/ete4.py +2 -5
- iplotx/ingest/providers/tree/simple.py +97 -0
- iplotx/ingest/providers/tree/skbio.py +2 -5
- iplotx/ingest/typing.py +109 -19
- iplotx/label.py +42 -12
- iplotx/layout.py +5 -1
- iplotx/network.py +69 -18
- iplotx/plotting.py +9 -9
- iplotx/{style.py → style/__init__.py} +150 -187
- iplotx/style/leaf_info.py +44 -0
- iplotx/style/library.py +324 -0
- iplotx/tree.py +279 -51
- iplotx/typing.py +2 -0
- iplotx/utils/geometry.py +32 -40
- iplotx/utils/matplotlib.py +43 -22
- iplotx/utils/style.py +17 -1
- iplotx/version.py +1 -1
- iplotx/vertex.py +63 -15
- {iplotx-0.3.1.dist-info → iplotx-0.5.0.dist-info}/METADATA +2 -1
- iplotx-0.5.0.dist-info/RECORD +38 -0
- iplotx-0.3.1.dist-info/RECORD +0 -32
- {iplotx-0.3.1.dist-info → iplotx-0.5.0.dist-info}/WHEEL +0 -0
iplotx/style/library.py
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
style_library = {
|
|
2
|
+
"default": {
|
|
3
|
+
"vertex": {
|
|
4
|
+
"size": 20,
|
|
5
|
+
"facecolor": "black",
|
|
6
|
+
"marker": "o",
|
|
7
|
+
"label": {
|
|
8
|
+
"color": "white",
|
|
9
|
+
"horizontalalignment": "center",
|
|
10
|
+
"verticalalignment": "center",
|
|
11
|
+
"hpadding": 18,
|
|
12
|
+
"vpadding": 12,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
"edge": {
|
|
16
|
+
"linewidth": 1.5,
|
|
17
|
+
"linestyle": "-",
|
|
18
|
+
"color": "black",
|
|
19
|
+
"curved": False,
|
|
20
|
+
"tension": 1,
|
|
21
|
+
"looptension": 4,
|
|
22
|
+
"loopmaxangle": 60,
|
|
23
|
+
"paralleloffset": 3,
|
|
24
|
+
"label": {
|
|
25
|
+
"horizontalalignment": "center",
|
|
26
|
+
"verticalalignment": "center",
|
|
27
|
+
"rotate": False,
|
|
28
|
+
"bbox": {
|
|
29
|
+
"boxstyle": "round",
|
|
30
|
+
"facecolor": "white",
|
|
31
|
+
"edgecolor": "none",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
"arrow": {
|
|
35
|
+
"marker": "|>",
|
|
36
|
+
"width": 8,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
"grouping": {
|
|
40
|
+
"facecolor": ["grey", "steelblue", "tomato"],
|
|
41
|
+
"edgecolor": "black",
|
|
42
|
+
"linewidth": 1.5,
|
|
43
|
+
"alpha": 0.5,
|
|
44
|
+
"vertexpadding": 18,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
# Hollow style for organization charts et similar
|
|
48
|
+
"hollow": {
|
|
49
|
+
"vertex": {
|
|
50
|
+
"color": None,
|
|
51
|
+
"facecolor": "none",
|
|
52
|
+
"edgecolor": "black",
|
|
53
|
+
"linewidth": 1.5,
|
|
54
|
+
"marker": "r",
|
|
55
|
+
"size": "label",
|
|
56
|
+
"label": {
|
|
57
|
+
"color": "black",
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
# Tree style, with zero-size vertices
|
|
62
|
+
"tree": {
|
|
63
|
+
"vertex": {
|
|
64
|
+
"size": 0,
|
|
65
|
+
"label": {
|
|
66
|
+
"color": "black",
|
|
67
|
+
"size": 12,
|
|
68
|
+
"verticalalignment": "center",
|
|
69
|
+
"hmargin": 10,
|
|
70
|
+
"bbox": {
|
|
71
|
+
"boxstyle": "square,pad=0.5",
|
|
72
|
+
"facecolor": "none",
|
|
73
|
+
"edgecolor": "none",
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
"edge": {
|
|
78
|
+
"linewidth": 2.5,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
# Cogent3 tree style
|
|
82
|
+
"cogent3": {
|
|
83
|
+
"vertex": {
|
|
84
|
+
"size": 3,
|
|
85
|
+
"label": {
|
|
86
|
+
"color": "black",
|
|
87
|
+
"size": 10,
|
|
88
|
+
"verticalalignment": "center",
|
|
89
|
+
"bbox": {
|
|
90
|
+
"facecolor": "none",
|
|
91
|
+
"edgecolor": "none",
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
"edge": {
|
|
96
|
+
"linewidth": 1.5,
|
|
97
|
+
},
|
|
98
|
+
"leaf": {
|
|
99
|
+
"deep": False,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
# Dashed depth tree branches
|
|
103
|
+
"dashdepth": {
|
|
104
|
+
"vertex": {
|
|
105
|
+
"size": 2,
|
|
106
|
+
"label": {
|
|
107
|
+
"color": "black",
|
|
108
|
+
"size": 10,
|
|
109
|
+
"verticalalignment": "center",
|
|
110
|
+
"bbox": {
|
|
111
|
+
"facecolor": "none",
|
|
112
|
+
"edgecolor": "none",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
"edge": {
|
|
117
|
+
"linewidth": 1.5,
|
|
118
|
+
"split": {
|
|
119
|
+
"linestyle": ":",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
"leaf": {
|
|
123
|
+
"deep": False,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
# Dashed depth tree branches
|
|
127
|
+
"dashwidth": {
|
|
128
|
+
"vertex": {
|
|
129
|
+
"size": 2,
|
|
130
|
+
"label": {
|
|
131
|
+
"color": "black",
|
|
132
|
+
"size": 10,
|
|
133
|
+
"verticalalignment": "center",
|
|
134
|
+
"bbox": {
|
|
135
|
+
"facecolor": "none",
|
|
136
|
+
"edgecolor": "none",
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
"edge": {
|
|
141
|
+
"linewidth": 1.5,
|
|
142
|
+
"linestyle": ":",
|
|
143
|
+
"split": {
|
|
144
|
+
"linestyle": "-",
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
"leaf": {
|
|
148
|
+
"deep": False,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
# Greyscale style
|
|
152
|
+
"greyscale": {
|
|
153
|
+
"vertex": {
|
|
154
|
+
"color": None,
|
|
155
|
+
"facecolor": "lightgrey",
|
|
156
|
+
"edgecolor": "#111",
|
|
157
|
+
"marker": ">",
|
|
158
|
+
"size": 15,
|
|
159
|
+
"linewidth": 0.75,
|
|
160
|
+
"label": {
|
|
161
|
+
"color": "black",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
"edge": {
|
|
165
|
+
"color": "#111",
|
|
166
|
+
"linewidth": 0.75,
|
|
167
|
+
"arrow": {
|
|
168
|
+
"marker": ">",
|
|
169
|
+
},
|
|
170
|
+
"label": {
|
|
171
|
+
"rotate": True,
|
|
172
|
+
"color": "black",
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
# Edge highlight
|
|
177
|
+
"rededge": {
|
|
178
|
+
"vertex": {
|
|
179
|
+
"size": 13,
|
|
180
|
+
"color": None,
|
|
181
|
+
"facecolor": "none",
|
|
182
|
+
"edgecolor": "#111",
|
|
183
|
+
"linewidth": 2,
|
|
184
|
+
"label": {
|
|
185
|
+
"color": "#111",
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
"edge": {
|
|
189
|
+
"color": "tomato",
|
|
190
|
+
"linewidth": 2.5,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
# Vertex highlight
|
|
194
|
+
"rednode": {
|
|
195
|
+
"vertex": {
|
|
196
|
+
"size": 22,
|
|
197
|
+
"color": None,
|
|
198
|
+
"facecolor": "tomato",
|
|
199
|
+
"edgecolor": "firebrick",
|
|
200
|
+
"linewidth": 2,
|
|
201
|
+
},
|
|
202
|
+
"edge": {
|
|
203
|
+
"color": "#333",
|
|
204
|
+
"linewidth": 1,
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
# Eerie style
|
|
208
|
+
"eerie": {
|
|
209
|
+
"vertex": {
|
|
210
|
+
"color": None,
|
|
211
|
+
"facecolor": "white",
|
|
212
|
+
"edgecolor": "#111",
|
|
213
|
+
"linestyle": "--",
|
|
214
|
+
"linewidth": 2,
|
|
215
|
+
},
|
|
216
|
+
"edge": {
|
|
217
|
+
"color": "#111",
|
|
218
|
+
"linestyle": "--",
|
|
219
|
+
"linewidth": 2,
|
|
220
|
+
"arrow": {
|
|
221
|
+
"marker": ")",
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
# Emulate a little networkx
|
|
226
|
+
"networkx": {
|
|
227
|
+
"vertex": {
|
|
228
|
+
"color": None,
|
|
229
|
+
"facecolor": "steelblue",
|
|
230
|
+
"edgecolor": "none",
|
|
231
|
+
"label": {
|
|
232
|
+
"color": "black",
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
"edge": {
|
|
236
|
+
"color": "black",
|
|
237
|
+
"linewidth": 1.5,
|
|
238
|
+
"arrow": {
|
|
239
|
+
"width": 5,
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
"igraph": {
|
|
244
|
+
"vertex": {
|
|
245
|
+
"color": None,
|
|
246
|
+
"facecolor": "lightblue",
|
|
247
|
+
"edgecolor": "black",
|
|
248
|
+
"linewidth": 2,
|
|
249
|
+
"label": {
|
|
250
|
+
"color": "black",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
"edge": {
|
|
254
|
+
"color": "black",
|
|
255
|
+
"linewidth": 2,
|
|
256
|
+
"arrow": {
|
|
257
|
+
"marker": "|>",
|
|
258
|
+
"width": 6.5,
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
# Colorful style for general use
|
|
263
|
+
"unicorn": {
|
|
264
|
+
"vertex": {
|
|
265
|
+
"size": 23,
|
|
266
|
+
"color": None,
|
|
267
|
+
"facecolor": [
|
|
268
|
+
"darkorchid",
|
|
269
|
+
"slateblue",
|
|
270
|
+
"seagreen",
|
|
271
|
+
"lime",
|
|
272
|
+
"gold",
|
|
273
|
+
"orange",
|
|
274
|
+
"sandybrown",
|
|
275
|
+
"tomato",
|
|
276
|
+
"deeppink",
|
|
277
|
+
],
|
|
278
|
+
"edgecolor": "black",
|
|
279
|
+
"linewidth": 1,
|
|
280
|
+
"marker": "*",
|
|
281
|
+
"label": {
|
|
282
|
+
"color": [
|
|
283
|
+
"white",
|
|
284
|
+
"white",
|
|
285
|
+
"white",
|
|
286
|
+
"black",
|
|
287
|
+
"black",
|
|
288
|
+
"black",
|
|
289
|
+
"black",
|
|
290
|
+
"white",
|
|
291
|
+
"white",
|
|
292
|
+
],
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
"edge": {
|
|
296
|
+
"color": [
|
|
297
|
+
"darkorchid",
|
|
298
|
+
"slateblue",
|
|
299
|
+
"seagreen",
|
|
300
|
+
"lime",
|
|
301
|
+
"gold",
|
|
302
|
+
"orange",
|
|
303
|
+
"sandybrown",
|
|
304
|
+
"tomato",
|
|
305
|
+
"deeppink",
|
|
306
|
+
],
|
|
307
|
+
"linewidth": 1.5,
|
|
308
|
+
"label": {
|
|
309
|
+
"rotate": False,
|
|
310
|
+
"color": [
|
|
311
|
+
"white",
|
|
312
|
+
"white",
|
|
313
|
+
"white",
|
|
314
|
+
"black",
|
|
315
|
+
"black",
|
|
316
|
+
"black",
|
|
317
|
+
"black",
|
|
318
|
+
"white",
|
|
319
|
+
"white",
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
}
|