risk-network 0.0.4b3__py3-none-any.whl → 0.0.5b1__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.
- risk/__init__.py +2 -2
- risk/network/plot.py +12 -2
- risk/risk.py +4 -0
- {risk_network-0.0.4b3.dist-info → risk_network-0.0.5b1.dist-info}/METADATA +1 -1
- {risk_network-0.0.4b3.dist-info → risk_network-0.0.5b1.dist-info}/RECORD +8 -8
- {risk_network-0.0.4b3.dist-info → risk_network-0.0.5b1.dist-info}/WHEEL +1 -1
- {risk_network-0.0.4b3.dist-info → risk_network-0.0.5b1.dist-info}/LICENSE +0 -0
- {risk_network-0.0.4b3.dist-info → risk_network-0.0.5b1.dist-info}/top_level.txt +0 -0
risk/__init__.py
CHANGED
risk/network/plot.py
CHANGED
@@ -33,6 +33,7 @@ class NetworkPlotter:
|
|
33
33
|
plot_outline: bool = True,
|
34
34
|
outline_color: str = "black",
|
35
35
|
outline_scale: float = 1.0,
|
36
|
+
linestyle: str = "dashed",
|
36
37
|
) -> None:
|
37
38
|
"""Initialize the NetworkPlotter with a NetworkGraph object and plotting parameters.
|
38
39
|
|
@@ -43,11 +44,18 @@ class NetworkPlotter:
|
|
43
44
|
plot_outline (bool, optional): Whether to plot the network perimeter circle. Defaults to True.
|
44
45
|
outline_color (str, optional): Color of the network perimeter circle. Defaults to "black".
|
45
46
|
outline_scale (float, optional): Outline scaling factor for the perimeter diameter. Defaults to 1.0.
|
47
|
+
linestyle (str): Line style for the network perimeter circle (e.g., dashed, solid). Defaults to "dashed".
|
46
48
|
"""
|
47
49
|
self.graph = graph
|
48
50
|
# Initialize the plot with the specified parameters
|
49
51
|
self.ax = self._initialize_plot(
|
50
|
-
graph,
|
52
|
+
graph,
|
53
|
+
figsize,
|
54
|
+
background_color,
|
55
|
+
plot_outline,
|
56
|
+
outline_color,
|
57
|
+
outline_scale,
|
58
|
+
linestyle,
|
51
59
|
)
|
52
60
|
|
53
61
|
def _initialize_plot(
|
@@ -58,6 +66,7 @@ class NetworkPlotter:
|
|
58
66
|
plot_outline: bool,
|
59
67
|
outline_color: str,
|
60
68
|
outline_scale: float,
|
69
|
+
linestyle: str,
|
61
70
|
) -> plt.Axes:
|
62
71
|
"""Set up the plot with figure size, optional circle perimeter, and background color.
|
63
72
|
|
@@ -68,6 +77,7 @@ class NetworkPlotter:
|
|
68
77
|
plot_outline (bool): Whether to plot the network perimeter circle.
|
69
78
|
outline_color (str): Color of the network perimeter circle.
|
70
79
|
outline_scale (float): Outline scaling factor for the perimeter diameter.
|
80
|
+
linestyle (str): Line style for the network perimeter circle (e.g., dashed, solid).
|
71
81
|
|
72
82
|
Returns:
|
73
83
|
plt.Axes: The axis object for the plot.
|
@@ -87,7 +97,7 @@ class NetworkPlotter:
|
|
87
97
|
circle = plt.Circle(
|
88
98
|
center,
|
89
99
|
scaled_radius,
|
90
|
-
linestyle=
|
100
|
+
linestyle=linestyle, # Use the linestyle argument here
|
91
101
|
color=outline_color,
|
92
102
|
fill=False,
|
93
103
|
linewidth=1.5,
|
risk/risk.py
CHANGED
@@ -352,6 +352,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
352
352
|
plot_outline: bool = True,
|
353
353
|
outline_color: str = "black",
|
354
354
|
outline_scale: float = 1.00,
|
355
|
+
linestyle: str = "dashed",
|
355
356
|
) -> NetworkPlotter:
|
356
357
|
"""Get a NetworkPlotter object for plotting.
|
357
358
|
|
@@ -362,6 +363,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
362
363
|
plot_outline (bool, optional): Whether to plot the network outline. Defaults to True.
|
363
364
|
outline_color (str, optional): Color of the outline. Defaults to "black".
|
364
365
|
outline_scale (float, optional): Scaling factor for the outline. Defaults to 1.00.
|
366
|
+
linestyle (str): Line style for the network perimeter circle (e.g., dashed, solid). Defaults to "dashed".
|
365
367
|
|
366
368
|
Returns:
|
367
369
|
NetworkPlotter: A NetworkPlotter object configured with the given parameters.
|
@@ -374,6 +376,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
374
376
|
plot_outline=plot_outline,
|
375
377
|
outline_color=outline_color,
|
376
378
|
outline_scale=outline_scale,
|
379
|
+
linestyle=linestyle,
|
377
380
|
)
|
378
381
|
|
379
382
|
# Initialize and return a NetworkPlotter object
|
@@ -384,6 +387,7 @@ class RISK(NetworkIO, AnnotationsIO):
|
|
384
387
|
plot_outline=plot_outline,
|
385
388
|
outline_color=outline_color,
|
386
389
|
outline_scale=outline_scale,
|
390
|
+
linestyle=linestyle,
|
387
391
|
)
|
388
392
|
|
389
393
|
def _load_neighborhoods(
|
@@ -1,6 +1,6 @@
|
|
1
|
-
risk/__init__.py,sha256=
|
1
|
+
risk/__init__.py,sha256=MiqPt6LZ6Qw1gZHCOHv-cEkNw-RNuZLJeI4IW6hDCQU,112
|
2
2
|
risk/constants.py,sha256=AICk3x5qRQhls_ijTb4VdbdxU6mZ1aLGbAjLEdBwfJI,550
|
3
|
-
risk/risk.py,sha256=
|
3
|
+
risk/risk.py,sha256=UYM_Pf2Db-lbf4O5T2v5zKutz_GLXK-f43PgYT6xRyY,21328
|
4
4
|
risk/annotations/__init__.py,sha256=vUpVvMRE5if01Ic8QY6M2Ae3EFGJHdugEe9PdEkAW4Y,138
|
5
5
|
risk/annotations/annotations.py,sha256=t4aLwROCFHcqk8g-viuwkFG--HqVpVN_2yVVcjhg6wI,10534
|
6
6
|
risk/annotations/io.py,sha256=TMicRACfY8bNtmbvVrxHoh8zkOVLOIhZwWrpxUlR28Q,7988
|
@@ -15,7 +15,7 @@ risk/network/__init__.py,sha256=iEPeJdZfqp0toxtbElryB8jbz9_t_k4QQ3iDvKE8C_0,126
|
|
15
15
|
risk/network/geometry.py,sha256=H1yGVVqgbfpzBzJwEheDLfvGLSA284jGQQTn612L4Vc,6759
|
16
16
|
risk/network/graph.py,sha256=m3bFWU5528OEm246LPG5XP3l_30vaBiJv4AO4iq0pSA,11552
|
17
17
|
risk/network/io.py,sha256=otiRG6uT6HLgbbJql7X2wjYxab8OFJSgRoWJlcDoyu4,20291
|
18
|
-
risk/network/plot.py,sha256=
|
18
|
+
risk/network/plot.py,sha256=MIXbeG0mQq53nX0BvoCpJBcPLICJX_NyR34B_HzEa2Y,40477
|
19
19
|
risk/stats/__init__.py,sha256=e-BE_Dr_jgiK6hKM-T-tlG4yvHnId8e5qjnM0pdwNVc,230
|
20
20
|
risk/stats/fisher_exact.py,sha256=-bPwzu76-ob0HzrTV20mXUTot7v-MLuqFaAoab-QxPg,4966
|
21
21
|
risk/stats/hypergeom.py,sha256=lrIFdhCWRjvM4apYw1MlOKqT_IY5OjtCwrjdtJdt6Tg,4954
|
@@ -23,8 +23,8 @@ risk/stats/stats.py,sha256=kvShov-94W6ffgDUTb522vB9hDJQSyTsYif_UIaFfSM,7059
|
|
23
23
|
risk/stats/permutation/__init__.py,sha256=neJp7FENC-zg_CGOXqv-iIvz1r5XUKI9Ruxhmq7kDOI,105
|
24
24
|
risk/stats/permutation/permutation.py,sha256=qLWdwxEY6nmkYPxpM8HLDcd2mbqYv9Qr7CKtJvhLqIM,9220
|
25
25
|
risk/stats/permutation/test_functions.py,sha256=HuDIM-V1jkkfE1rlaIqrWWBSKZt3dQ1f-YEDjWpnLSE,2343
|
26
|
-
risk_network-0.0.
|
27
|
-
risk_network-0.0.
|
28
|
-
risk_network-0.0.
|
29
|
-
risk_network-0.0.
|
30
|
-
risk_network-0.0.
|
26
|
+
risk_network-0.0.5b1.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
|
27
|
+
risk_network-0.0.5b1.dist-info/METADATA,sha256=-cF8mh-xTmEBsKn-xVVNIo_5YG2Njz69186Pu-xE43U,43236
|
28
|
+
risk_network-0.0.5b1.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
29
|
+
risk_network-0.0.5b1.dist-info/top_level.txt,sha256=NX7C2PFKTvC1JhVKv14DFlFAIFnKc6Lpsu1ZfxvQwVw,5
|
30
|
+
risk_network-0.0.5b1.dist-info/RECORD,,
|
File without changes
|
File without changes
|