Locking Node Positions

901 views
Skip to first unread message

Kurt Ebeling

unread,
Jun 30, 2015, 12:08:32 PM6/30/15
to cytoscape...@googlegroups.com
Hi,

I am trying to fix the x and y positioning of nodes such that any edits to the existing network do not alter the positioning of nodes (e.g. merging two networks, making stylistic edits to nodes and edges, adding nodes, etc.)

Is there a way to lock the positioning of each node on the network, so that the Cytoscape layout algorithm doesn't alter their positioning?

Thanks,

Kurt

Barry Demchak

unread,
Jun 30, 2015, 12:16:33 PM6/30/15
to cytoscape...@googlegroups.com

Kurt –

 

There isn’t a locking mechanism per-se … but some layouts (e.g., circular and hierarchical) will allow you to lay out only selected nodes. This isn’t the same thing, but may get you where you need to go.

 

Thinking further on this, for the unlocked nodes, how do you think they should interact with the fixed nodes during a layout? For example, suppose a circular layout, lock all node positions, and then add a node. Where would the new node be positioned after the layout?

--
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 post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at http://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.

Scooter Morris

unread,
Jun 30, 2015, 2:34:33 PM6/30/15
to cytoscape...@googlegroups.com
Hi Kurt,
    Sure, go to the Style panel and under Properties, select X position and Y position.  Then select the node you want to fix the position of and enter the position as an override in the "Byp." column for the X and Y positions.  From my testing, that will override any layout.

-- scooter

Kurt Ebeling

unread,
Jul 2, 2015, 12:13:50 PM7/2/15
to cytoscape...@googlegroups.com
Thanks Scooter!

It's tedious, but it works!


On Tuesday, June 30, 2015 at 12:34:33 PM UTC-6, Scooter Morris wrote:
Hi Kurt,
    Sure, go to the Style panel and under Properties, select X position and Y position.  Then select the node you want to fix the position of and enter the position as an override in the "Byp." column for the X and Y positions.  From my testing, that will override any layout.

-- scooter

On 06/30/2015 09:08 AM, Kurt Ebeling wrote:
Hi,

I am trying to fix the x and y positioning of nodes such that any edits to the existing network do not alter the positioning of nodes (e.g. merging two networks, making stylistic edits to nodes and edges, adding nodes, etc.)

Is there a way to lock the positioning of each node on the network, so that the Cytoscape layout algorithm doesn't alter their positioning?

Thanks,

Kurt
--
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-helpdesk+unsub...@googlegroups.com.

Fletcher Barton

unread,
Jun 24, 2024, 3:03:44 PM (5 days ago) Jun 24
to cytoscape-helpdesk
I'm trying to do this but can't, for one trivial reason and one non-trivial reason. Trivial: If I choose the Style panel before selecting the node, the Style panel collapses when I choose the node. Nontrivial: The Bypass dialogue ("Node Y Location", for example) asks for a number, but I have no way of knowing what that number should be, so I don't know what to enter. Please help.

While we're at it, in the Style panel my X Location's 'Map.' column is blank and X Location has no Column or Mapping Type or values, but my Y Location's 'Map.' column has a 6-dot grid and has a Column and Mapping Type and several values. Is this difference germane to my wanting to lock/fix a node's position, and if so how should I proceed?

Thanks.

Scooter Morris

unread,
Jun 26, 2024, 7:53:00 PM (3 days ago) Jun 26
to cytoscape-helpdesk
On Monday, June 24, 2024 at 12:03:44 PM UTC-7 bartonf...@gmail.com wrote:
I'm trying to do this but can't, for one trivial reason and one non-trivial reason. Trivial: If I choose the Style panel before selecting the node, the Style panel collapses when I choose the node.
I haven't seen that before, and it certainly shouldn't collapse.  Can you send us a screenshot?
 
Nontrivial: The Bypass dialogue ("Node Y Location", for example) asks for a number, but I have no way of knowing what that number should be, so I don't know what to enter. Please help.
Well, that will take some trial and error.    Generally speaking, if nothing has changed, 0,0 should be in the middle of the screen, negative X is to the left and negative Y is up.

While we're at it, in the Style panel my X Location's 'Map.' column is blank and X Location has no Column or Mapping Type or values, but my Y Location's 'Map.' column has a 6-dot grid and has a Column and Mapping Type and several values. Is this difference germane to my wanting to lock/fix a node's position, and if so how should I proceed?
That means there is a mapping for the Y values.  You can always override any mapping by putting a value in the Bypass column.

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