There is a newer version of the record available.

Published June 25, 2025 | Version v2
Journal article Open

Keçeci Layout

  • 1. Physicist

Description

Keçeci Layout
                                   
Mehmet Keçeci1
1ORCID  : https://orcid.org/0000-0001-9937-9839, İstanbul, Türkiye

Received: 01.05.2025

Özet/Abstract:
                                         
Keçeci Layout is a deterministic node layout algorithm designed for graph visualization in Python. Its primary purpose is to position the nodes of a graph in a predefined, sequential, and repeatable manner. The algorithm processes nodes sequentially, placing them along a user-defined primary axis (e.g., top-down or left-to-right) while applying an offset on the secondary axis in a zigzag pattern. This zigzag pattern helps prevent node overlaps while maintaining an orderly structure. The function is designed to be compatible with popular Python graph libraries, including NetworkX, Rustworkx, igraph, Networkit, and Graphillion (via GraphSet objects). It takes a graph object from one of these libraries as input, processes the nodes (usually by sorting their IDs), and returns a Python dictionary mapping each node's identifier (in the library-specific format) to its calculated (x, y) coordinates. Users can customize the node spacing along the primary and secondary axes (`primary_spacing`, `secondary_spacing`), the main direction of the layout (`primary_direction`), and the starting side of the zigzag pattern (`secondary_start`) through parameters. This regular and predictable structure is useful, particularly when the order of nodes is significant or when a simple, aesthetically pleasing, and easily traceable graph visualization is desired. Keçeci Layout is a deterministic node layout algorithm designed for graph visualization in Python. Its primary purpose is to position the nodes of a graph in a predefined, sequential, and repeatable manner. The algorithm processes nodes sequentially, placing them along a user-defined primary axis (e.g., top-down or left-to-right) while applying an offset on the secondary axis in a zigzag pattern. This zigzag pattern helps prevent node overlaps while maintaining an orderly structure. The function is designed to be compatible with popular Python graph libraries, including NetworkX, Rustworkx, igraph, Networkit, and Graphillion (via GraphSet objects). It takes a graph object from one of these libraries as input, processes the nodes (usually by sorting their IDs), and returns a Python dictionary mapping each node's identifier (in the library-specific format) to its calculated (x, y) coordinates. Users can customize the node spacing along the primary and secondary axes (`primary_spacing`, `secondary_spacing`), the main direction of the layout (`primary_direction`), and the starting side of the zigzag pattern (`secondary_start`) through parameters. This regular and predictable structure is useful, particularly when the order of nodes is significant or when a simple, aesthetically pleasing, and easily traceable graph visualization is desired.

Keywords: Graph Layout, Node Positioning, Zigzag Layout, Sequential Layout, Deterministic Algorithm, Graph Visualization, Keçeci Layout, KececiLayout

 

Files

KececiLayout-3.pdf

Files (1.6 MB)

Name Size Download all
md5:dd5b57a6e3b490572798a459a0582fcf
1.6 MB Preview Download

Additional details

Dates

Accepted
2025-05-01
Keçeci Layout