Hi Michael,
Actually, in Cytoscape 2.x this is pretty easy. I'm going to
assume that you're updating the position of a node in the current
network. If so, here is what you would do:
public void updateNode(CyNode node, double x, double y) {
CyNetworkView networkView =
Cytoscape.getCurrentNetworkView();
NodeView nv = networkView.getNodeView(node);
nv.setXPosition(x);
nv.setYPosition(y);
}
Hope this helps!
-- scooter
On 09/12/2012 09:18 AM, Michael Zimmermann wrote:
I am new to cytoscape but want to be able to explicitly set
node coordiantes. In the API documentation I have seen
the CyNodeView method getXPosition() at
This
Location,and the corresponding set method for x and y.
I imagine these could be used for what I want, but am new
enough to Java and the Cytoscape API that I don't understant how
to invoke these methods. I don't see an example in the
developer's Cookbook either. Could a simple example of their use
be provided?
Thank you very much.
--
You received this message because you are subscribed to the Google
Groups "cytoscape-helpdesk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cytoscape-helpdesk/-/gVSEGhTFtU0J.
To post to this group, send email to
cytoscape...@googlegroups.com.
To unsubscribe from this group, send email to
cytoscape-helpd...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cytoscape-helpdesk?hl=en.