kececilayout 0.3.8__py3-none-any.whl → 0.3.9__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.
- kececilayout/__init__.py +2 -1
- kececilayout/_version.py +2 -1
- kececilayout/kececi_layout.py +26 -0
- {kececilayout-0.3.8.dist-info → kececilayout-0.3.9.dist-info}/METADATA +1 -1
- kececilayout-0.3.9.dist-info/RECORD +8 -0
- kececilayout-0.3.8.dist-info/RECORD +0 -8
- {kececilayout-0.3.8.dist-info → kececilayout-0.3.9.dist-info}/WHEEL +0 -0
- {kececilayout-0.3.8.dist-info → kececilayout-0.3.9.dist-info}/licenses/LICENSE +0 -0
- {kececilayout-0.3.8.dist-info → kececilayout-0.3.9.dist-info}/top_level.txt +0 -0
kececilayout/__init__.py
CHANGED
|
@@ -10,7 +10,7 @@ import inspect
|
|
|
10
10
|
import warnings
|
|
11
11
|
|
|
12
12
|
# Paket sürüm numarası
|
|
13
|
-
__version__ = "0.3.
|
|
13
|
+
__version__ = "0.3.9"
|
|
14
14
|
|
|
15
15
|
# =============================================================================
|
|
16
16
|
# OTOMATİK İÇE AKTARMA VE __all__ OLUŞTURMA
|
|
@@ -123,3 +123,4 @@ def old_function_placeholder():
|
|
|
123
123
|
|
|
124
124
|
# Eğer bu eski fonksiyonu da dışa aktarmak istiyorsanız, __all__ listesine ekleyin
|
|
125
125
|
# __all__.append('old_function_placeholder')
|
|
126
|
+
|
kececilayout/_version.py
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# _version.py
|
|
2
2
|
|
|
3
|
-
__version__ = "0.3.
|
|
3
|
+
__version__ = "0.3.9"
|
|
4
4
|
__license__ = "MIT"
|
|
5
5
|
__description__ = "A deterministic node placement algorithm used in graph visualization. In this layout, nodes are arranged sequentially along a defined primary axis. Each subsequent node is then alternately offset along a secondary, perpendicular axis, typically moving to one side of the primary axis and then the other. Often, the magnitude of this secondary offset increases as nodes progress along the primary axis, creating a characteristic zig-zag or serpentine pattern."
|
|
6
6
|
__author__ = "Mehmet Keçeci"
|
|
7
7
|
__url__ = "https://github.com/WhiteSymmetry/kececilayout"
|
|
8
8
|
__docs__ = "https://github.com/WhiteSymmetry/kececilayout" # Opsiyonel: Dokümantasyon linki
|
|
9
9
|
__dependencies__ = ["python>=3.10"] # Diğer bağımlılıkları da ekleyebilirsiniz
|
|
10
|
+
|
kececilayout/kececi_layout.py
CHANGED
|
@@ -1143,6 +1143,31 @@ def _kececi_layout_3d_helix(nx_graph):
|
|
|
1143
1143
|
pos_3d[node_id] = (np.cos(angle) * radius, np.sin(angle) * radius, z_step)
|
|
1144
1144
|
return pos_3d
|
|
1145
1145
|
|
|
1146
|
+
def kececi_layout_3d_helix_parametric(nx_graph, z_spacing=2.0, radius=5.0, turns=2.0):
|
|
1147
|
+
"""
|
|
1148
|
+
Parametric 3D helix layout for nodes. User can control spacing, radius, and number of turns.
|
|
1149
|
+
Args:
|
|
1150
|
+
nx_graph: NetworkX graph.
|
|
1151
|
+
z_spacing (float): Vertical distance between consecutive nodes.
|
|
1152
|
+
radius (float): Radius of the helix.
|
|
1153
|
+
turns (float): Number of full turns the helix makes.
|
|
1154
|
+
Returns:
|
|
1155
|
+
dict: {node_id: (x, y, z)}
|
|
1156
|
+
"""
|
|
1157
|
+
nodes = sorted(list(nx_graph.nodes()))
|
|
1158
|
+
pos_3d = {}
|
|
1159
|
+
total_nodes = len(nodes)
|
|
1160
|
+
if total_nodes == 0:
|
|
1161
|
+
return pos_3d
|
|
1162
|
+
|
|
1163
|
+
total_angle = 2 * np.pi * turns
|
|
1164
|
+
for i, node_id in enumerate(nodes):
|
|
1165
|
+
z = i * z_spacing
|
|
1166
|
+
angle = (i / (total_nodes - 1)) * total_angle if total_nodes > 1 else 0
|
|
1167
|
+
x = np.cos(angle) * radius
|
|
1168
|
+
y = np.sin(angle) * radius
|
|
1169
|
+
pos_3d[node_id] = (x, y, z)
|
|
1170
|
+
return pos_3d
|
|
1146
1171
|
|
|
1147
1172
|
# =============================================================================
|
|
1148
1173
|
# 3. INTERNAL DRAWING STYLE IMPLEMENTATIONS
|
|
@@ -1272,3 +1297,4 @@ if __name__ == '__main__':
|
|
|
1272
1297
|
|
|
1273
1298
|
|
|
1274
1299
|
|
|
1300
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
kececilayout/__init__.py,sha256=wxZgl7R0fCjgzR1b5EshGN2GtECSTxUiO5ggXkd1s7Q,3822
|
|
2
|
+
kececilayout/_version.py,sha256=zS6ZQ4G4hAf27IT9zPCoyPAad5ljQfixLSdPHbp-yls,815
|
|
3
|
+
kececilayout/kececi_layout.py,sha256=5KMckoOvH7elXPG3hwzslukkduCgR3cLUd-FYyt_diM,59450
|
|
4
|
+
kececilayout-0.3.9.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
|
|
5
|
+
kececilayout-0.3.9.dist-info/METADATA,sha256=U0f7dBzupHOH8ch9aqOnyHFHyhXy993tZzB7yB6KnKI,48622
|
|
6
|
+
kececilayout-0.3.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
+
kececilayout-0.3.9.dist-info/top_level.txt,sha256=OBzN_wm4q-iwSkeACF4E8ET_LFLJKBTldSH3D1jG2hA,13
|
|
8
|
+
kececilayout-0.3.9.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
kececilayout/__init__.py,sha256=j6hA5l8lasc8y099cez-OPlPxHXqKTG8yV_VSzzOsHc,3820
|
|
2
|
-
kececilayout/_version.py,sha256=aaui090cDr8JgGQyqdiH69Mlxd4rKM5rOEnpg0N1BW8,813
|
|
3
|
-
kececilayout/kececi_layout.py,sha256=VqN6T7SQXhPOMsSJJEYGx2t6E8qYuLqzIU4W-eTbOYw,58507
|
|
4
|
-
kececilayout-0.3.8.dist-info/licenses/LICENSE,sha256=NJZsJEbQuKzxn1mWPWCbRx8jRUqGS22thl8wwuRQJ9c,1071
|
|
5
|
-
kececilayout-0.3.8.dist-info/METADATA,sha256=KYEhuN1evQgITFDOEocZ83BA4LW6UtwWZxxRAc-qmyQ,48622
|
|
6
|
-
kececilayout-0.3.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
7
|
-
kececilayout-0.3.8.dist-info/top_level.txt,sha256=OBzN_wm4q-iwSkeACF4E8ET_LFLJKBTldSH3D1jG2hA,13
|
|
8
|
-
kececilayout-0.3.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|