Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Keçeci Layout

directions = [‘top_down’, ‘bottom_up’, ‘left-to-right’, ‘right-to-left’] primary_direction (str): ‘top_down’, ‘bottom_up’, ‘left-to-right’, ‘right-to-left’. secondary_start (str): Initial direction for the zigzag (‘up’, ‘down’, ‘left’, ‘right’).

Advanced Drawing Styles

Use draw_kececi for enhanced visualizations:

kl.draw_kececi(G, style=‘curved’) # Smooth curved edges kl.draw_kececi(G, style=‘transparent’) # Opacity based on edge length kl.draw_kececi(G, style=‘3d’) # 3D helix layout

Drawing Styles

KeçeciLayout supports advanced visualization styles.

Curved Edges

Edges are drawn as arcs.

kl.draw_kececi(G, style=‘curved’, node_color=‘skyblue’)

Transparent Edges

Edge opacity depends on length.

kl.draw_kececi(G, style=‘transparent’, node_color=‘purple’)

3D Helix

Nodes are placed in a 3D spiral.

kl.draw_kececi(G, style=‘3d’, ax=plt.figure().add_subplot(projection=‘3d’))

layouts = [‘2d’, ‘cylindrical’, ‘cubic’, ‘spherical’, ‘elliptical’, ‘toric’]

styles = [‘standard’, ‘default’, ‘curved’, ‘helix’, ‘3d’, ‘weighted’, ‘colored’]

<Figure size 600x800 with 1 Axes>

--- NetworkX Example ---
NetworkX graph generated: 10 nodes, 9 edges
Calculating Keçeci Layout...
<Figure size 600x800 with 1 Axes>

--- NetworkX Example Finished ---
<Figure size 800x600 with 1 Axes>
Graph has 10 vertices and 9 edges
kececi_layout returned: {0: (0.0, 0.0), 1: (1.0, 1.0), 2: (2.0, -1.0), 3: (3.0, 2.0), 4: (4.0, -2.0), 5: (5.0, 3.0), 6: (6.0, -3.0), 7: (7.0, 4.0), 8: (8.0, -4.0), 9: (9.0, 5.0)}
Type: <class 'dict'>
Length: 10
First element: (0.0, 0.0)
NetworkX graph has 10 nodes and 9 edges
Layout positions type: <class 'dict'>
Positions are in dictionary format
<Figure size 800x600 with 1 Axes>
<Figure size 800x600 with 1 Axes>

--- igraph Example ---
igraph graph generated: 10 vertices, 9 edges
Calculating Keçeci Layout...
Plotting graph using igraph.plot...
<Figure size 600x800 with 1 Axes>

--- igraph Example Finished ---

--- Rustworkx Example ---
Rustworkx graph generated: 10 nodes, 9 edges
Calculating Keçeci Layout...
Plotting graph using Matplotlib...
<Figure size 600x800 with 1 Axes>

--- Rustworkx Example Finished ---

--- Networkit Example ---
Empty Networkit graph generated.
10 nodes added.
Networkit graph constructed: 10 nodes, 9 edges
Calculating Keçeci Layout...
Plotting graph using Matplotlib...
<Figure size 600x800 with 1 Axes>

--- Networkit Example Finished ---

--- Graphillion Example ---
Graphillion universe defined: 9 edges, max node ID 10
Calculating Keçeci Layout...
Plotting graph using Matplotlib...
<Figure size 600x800 with 1 Axes>

--- Graphillion Example Finished ---
<Figure size 600x1000 with 1 Axes>

--- graph-tool Example ---
Calculating Keçeci Layout...
Plotting graph using Matplotlib...
<Figure size 600x800 with 1 Axes>

--- graph-tool Example Finished ---