How to create a circular network with evenly distributed nodes (Not Just Around the Rim)

27 views
Skip to first unread message

liu xn

unread,
Dec 17, 2024, 7:43:56 AM12/17/24
to cytoscape-helpdesk

Hi all,

I am trying to replicate a network visualization where the nodes are evenly dispersed inside and around a circle, similar to the example I have attached here . I have tried several layouts in Cytoscape, including the Circular Layout and Radial Layout, but these always place most nodes around the rim of the circle, leaving the center relatively empty.

The network I am working with has hubs (highly connected nodes) and peripheral nodes (less connected nodes), and I would like to distribute these more evenly across the entire circular space, not just along the edge.

Does anyone know how I can achieve this in Cytoscape? Are there specific layouts, combinations of layouts, or custom settings that I should try?

Any suggestions would be greatly appreciated. Thank you in advance for your help!

nihms-1699644-f0005.jpg
1-s2.0-S1534580724007196-gr1.jpg
nihms-1699644-f0007.jpg

Alex Pico

unread,
Dec 17, 2024, 5:59:23 PM12/17/24
to cytoscape-helpdesk
Hi,

One idea is to use the BoundaryLayout app. I was able to generate this layout (screenshot) by these steps:

 1. Install BoundayLayout app
 2. Open Annotations tab (left side) and create a circle shape
 3. Name the shape (e.g., “circle”)
 4. Add a column to your node table (e.g., named “boundary”) and enter the value “circle” and then copy to entire row
 5. Open the Boundaries tab (left side) and click on + to add the circle as a template
 6. Menu: Layout > Boundary Layout > “boundaries”
 7. (Optional) Layout > yFiles Remove Overlaps.

Then you can simply delete the circle.  

It’s not exactly what you want in terms of even spacing. You might play with smaller circular boundaries to “force” even spacing?

 - Alex




Screenshot 2024-12-17 at 2.54.57 PM.png

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cytoscape-helpdesk/07b173f2-89a3-4ccd-8a29-10b70793a50fn%40googlegroups.com.
<nihms-1699644-f0005.jpg><1-s2.0-S1534580724007196-gr1.jpg><nihms-1699644-f0007.jpg>

Alex Pico

unread,
Dec 17, 2024, 6:00:55 PM12/17/24
to cytoscape-helpdesk
Here’s the CYS file if it’s helpful to see the completed example...

- Alex

boundary_demo.cys

liu xn

unread,
Dec 18, 2024, 4:30:31 AM12/18/24
to cytoscape-helpdesk

Hi Alex,

Thank you so much for your clear instructions! I was able to follow the steps and reproduce a similar figure with my own data. However, I got a bit stuck on Step 5. I’m not sure how critical this step is—I skipped it and continued with the rest of the instructions, and I still managed to achieve something similar.

More specifically, I’m having trouble locating the "Boundaries tab" on the left side where I’m supposed to click the "+" to add the circle as a template. Could you kindly clarify where to find this tab or provide a bit more detail?

Many thanks again for your help and patience!
Liu

Scooter Morris

unread,
Dec 18, 2024, 11:06:52 PM12/18/24
to cytoscape-helpdesk
Hi Liu,

In the far left-hand side of your control panel should be a series of icons "Network", "Style", "Filter", "Annotation", "App Store" and, if you have installed BoundaryLayout, you should also see "Boundaries".  If you've disabled the "Show Labels" for the left hand tab list, then it will just be a "B" in a circle.

-- scooter
Reply all
Reply to author
Forward
0 new messages