Grouping and drawing

Is there an example that uses multiple groups within the graph and draw it
accordingly. I have multiple groups and I would like to draw the graph in a
way that all vertices within each group to be close to each other. I could
not achieve this with a problem that has a known solution, so I thought
maybe it is not possible, or if it is, someone could help me in how I
should try doing it.

The test problem that I've chosen is to take all amino acids, organize them
into groups according to their properties, and to get to this planar

I would like some general help ideas, but if someone would like to join me
in this small project, I can share what I've tried until now.


attachment.html (1.14 KB)

Take a look at the "groups" and "gamma" parameters in sfdp_layout(), as it
seems to address what you want.