cytoscape / cytoscape-tutorials

Collection of modular Cytoscape tutorials for online presentation using reveal.js
Creative Commons Zero v1.0 Universal
309 stars 118 forks source link

Multiple node fill colour #80

Closed JohnJPaul closed 1 year ago

JohnJPaul commented 1 year ago

Hi

Could anyone suggest a way to have different fill colours at the same time in a single node? Kind like a pie chart but the different parts are equally divided .

Thank you in advance

khanspers commented 1 year ago

Hi John, There's a way to do this using Custom Paint, which will produce two equally split colors on a rectangular node.

  1. In Style interface, go to Image/Chart 1 and click the Default column (left)
  2. Under Charts, select Heat Map (middle). Select the two columns of interest and click the right arrow to move them to the Selected Columns list. Remove the pre-selected column from that list.
  3. Select a color palette.
  4. Under Customize, select Horizontal Orientation. Click Apply.

See the below screenshot for an example.

Also, note that the cytoscape-helpdesk mailing list (cytoscape-helpdesk@googlegroups.com) is another place where you can ask questions.

Screen Shot 2023-01-18 at 9 21 44 AM
AlexanderPico commented 1 year ago

And that same chart dialog supports Pie Charts as well. Here's the corresponding chapter in the manual: http://manual.cytoscape.org/en/stable/Styles.html?highlight=pie%20chart#using-graphics-in-styles

There is an app with more advanced options if you want more control over visual elements: https://apps.cytoscape.org/apps/enhancedgraphics