Some program has a GUI allowing users to edit a "diagram", like Blender:

If I have the underlying data structure(possibly a directed graph?), how to draw a clean diagram on screen without overlaying nodes/confusing users? Are there some known algorithms?