defining a VisualStyle

20 views
Skip to first unread message

Albert Cardona

unread,
Dec 20, 2009, 2:05:52 AM12/20/09
to cytoscap...@googlegroups.com
Hi all,

I am new to programming with cytoscape as a library.
So far, I can create and visualize networks with specific
layouts--very simple, straightforward and pretty.

Are there any webpages documenting how to use VisualStyle, and what is
the general approach for defining different styles for specific nodes
and edges?

The CyNode class doesn't, by itself, seem to be the right point at
which to do any style editing.

The CyNetworkView may be obtained with a specific VisualStyle. The
VisualStyle is rather complex. Examples on how to use it or extend it
would be fantastic.

Thank you for any pointers.

Albert
--
http://albert.rierol.net

Peng-Liang Wang

unread,
Dec 20, 2009, 3:09:09 PM12/20/09
to cytoscap...@googlegroups.com
 
Peng


--

You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To post to this group, send email to cytoscap...@googlegroups.com.
To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cytoscape-discuss?hl=en.



Shaoyu Wang

unread,
Dec 20, 2009, 5:45:26 PM12/20/09
to cytoscap...@googlegroups.com
Dear All,

I am not a programmer instead just a user. I need to change the edge visual style in BATCH (NOT INDIVIDUALLY on the network). I know that information on the edge types (or interaction types between nodes) exists in my .txt file. But I just don't know how to translate this information into visual styles, such as give a different colour to different edge types. Any help is more than welcome.

Don't forget: Merry Christmas!

Shaun


________________________________

From: cytoscap...@googlegroups.com on behalf of Peng-Liang Wang
Sent: Mon 21/12/2009 7:09 AM
To: cytoscap...@googlegroups.com
Subject: Re: [Cytoscape-discuss] defining a VisualStyle


On Sat, Dec 19, 2009 at 11:05 PM, Albert Cardona <sapr...@gmail.com> wrote:


Hi all,

I am new to programming with cytoscape as a library.
So far, I can create and visualize networks with specific
layouts--very simple, straightforward and pretty.

Are there any webpages documenting how to use VisualStyle, and what is
the general approach for defining different styles for specific nodes
and edges?

The CyNode class doesn't, by itself, seem to be the right point at
which to do any style editing.

The CyNetworkView may be obtained with a specific VisualStyle. The
VisualStyle is rather complex. Examples on how to use it or extend it
would be fantastic.

Thank you for any pointers.

Albert
--

http://albert.rierol.net <http://albert.rierol.net/>


--

You received this message because you are subscribed to the Google Groups "cytoscape-discuss" group.
To post to this group, send email to cytoscap...@googlegroups.com.

To unsubscribe from this group, send email to cytoscape-disc...@googlegroups.com <mailto:cytoscape-discuss%2Bunsu...@googlegroups.com> .

winmail.dat

Albert Cardona

unread,
Dec 21, 2009, 12:10:03 AM12/21/09
to cytoscap...@googlegroups.com
Hi Peng,

On Sun, Dec 20, 2009 at 3:09 PM, Peng-Liang Wang <plw...@bioeng.ucsd.edu> wrote:
> you may look at this page
> http://cytoscape.wodaklab.org/wiki/plugin_developer_tutorial


Thanks for the page--that is the page I already found and that helped
me create and display a few networks.

The "How to use the VizMapper programmatically" section indeed
explains how to create a VisualStyle, but nowhere in it is indicated
how to alter what style is applied to what node.

Ideally, I'd like groups of nodes, where each node is colored distinctively.

Same for the edges: how to specify a few as arrows, and a few as mere lines?


Help appreciated very much for progressing in this direction.

Albert
--
http://albert.rierol.net

Peng-Liang Wang

unread,
Dec 21, 2009, 4:16:46 AM12/21/09
to cytoscap...@googlegroups.com

You may map the edge attribute to visual property. Click VizMapper tab in the Control panel. Double click ‘Edge color’. Then you can map your interaction type to the color you want to.

 

Peng

Peng-Liang Wang

unread,
Dec 21, 2009, 4:28:34 AM12/21/09
to cytoscap...@googlegroups.com
You can create a visual style, which maps an attribute to Node_Color.
 
Note that there are visual properties --  EDGE_SRCARROW_SHAPE and EDGE_TGTARROW_SHAPE. For the Arrow shape, you have the option Arrow, Diamond, No Arrow, etc.

 

Peng



Reply all
Reply to author
Forward
0 new messages