Algorithms for visualization of graph-based structures