Styles¶
Basic Styles¶
Functions for managing STYLES and retrieving general lists of properties relevant to multiple style modes. Functions specific to Default, Mapping, Bypass, Dependencies and Values are in separate files.
Style management functions
General property functions
Style Management¶
|
Create a new visual style by copying a specified style. |
|
Create a style from defaults and predefined mappings. |
|
Delete the specified visual style from current session. |
|
Delete all visual styles from current Cytoscape session. |
|
Save one or more visual styles to file. |
|
Get the current visual style applied to a network. |
|
Get all defaults and mappings for a visual style |
|
Retrieve a list of all visual style names. |
|
Load styles from an XML file and returns the names of the loaded styles. |
|
Apply a visual style to a network. |
Visual Property Names and Values¶
|
Get Arrow Shapes. |
|
Get Line Styles. |
|
Get Node Shapes. |
|
Retrieve the names of all possible visual properties. |
Style Automatic Mappings¶
Functions for defining automatic MAPPINGS between table column values and visual properties, organized into sections:
Palettes for color mapping generators
Schemes for discrete and numerical mapping generators
Functions for automatically mapping discrete values to colors, opacities, sizes, heights, widths and shapes
See style_mappings for manual mapping generation
Node Style Mapping Generators¶
|
Generate color map parameters for discrete or continuous values in a node table |
|
Generate height map parameters for discrete or continuous values in a node table |
|
Generate opacity map parameters for discrete or continuous values in a node table |
|
Generate shape map parameters for discrete values in a node table |
|
Generate size map parameters for discrete or continuous values in a node table |
|
Generate width map parameters for discrete or continuous values in a node table |
Edge Style Mapping Generators¶
|
Generate arrow shape map parameters for discrete values in an edge table |
|
Generate color map parameters for discrete or continuous values in an edge table |
|
Generate line style map parameters for discrete values in an edge table |
|
Generate opacity map parameters for discrete or continuous values in an edge table |
|
Generate size map parameters for discrete or continuous values in an edge table |
|
Generate width map parameters for discrete or continuous values in an edge table |
Schemes for Discrete Shape and Numeric Generators¶
|
Generate a continuous series |
Generate list of arrow shapes of a given size |
|
Generate list of line styles of a given size |
|
|
Generate list of random integers in a given range |
|
Generate list of numbers in a given series |
Generate list of node shapes of a given size |
Palettes for Discrete (Qualitative) Color Generators¶
|
Generate accent Brewer palette of a given size . |
|
Generate pastel2 Dark2 palette of a given size . |
|
Generate paired Brewer palette of a given size . |
|
Generate pastel1 Brewer palette of a given size . |
|
Generate pastel2 Brewer palette of a given size . |
|
Generate set1 Brewer palette of a given size . |
|
Generate set2 Brewer palette of a given size . |
|
Generate set3 Brewer palette of a given size . |
Generate random color map of a given size |
Palettes for One-Tailed Continuous (Sequential) Color Generators¶
|
Generate Blues Brewer palette of a given size . |
|
Generate BuGn Brewer palette of a given size . |
|
Generate BuPu Brewer palette of a given size . |
|
Generate GnBu Brewer palette of a given size . |
|
Generate Greens Brewer palette of a given size . |
|
Generate Greys Brewer palette of a given size . |
|
Generate Oranges Brewer palette of a given size . |
|
Generate OrRd Brewer palette of a given size . |
|
Generate PuBu Brewer palette of a given size . |
|
Generate PuBuGn Brewer palette of a given size . |
|
Generate RdPu Brewer palette of a given size . |
|
Generate PuRd Brewer palette of a given size . |
|
Generate Purples Brewer palette of a given size . |
|
Generate Reds Brewer palette of a given size . |
|
Generate YlGn Brewer palette of a given size . |
|
Generate YlGnBu Brewer palette of a given size . |
|
Generate YlOrBr Brewer palette of a given size . |
|
Generate YlOrRd Brewer palette of a given size . |
Palettes for Two-Tailed Continuous (Diverging) Color Generators¶
|
Generate BrBG Brewer palette of a given size . |
|
Generate PiYG Brewer palette of a given size . |
|
Generate PRGn Brewer palette of a given size . |
|
Generate PuOr Brewer palette of a given size . |
|
Generate RdBu Brewer palette of a given size . |
|
Generate RdGy Brewer palette of a given size . |
|
Generate RdYlBu Brewer palette of a given size . |
|
Generate RdYlGn Brewer palette of a given size . |
|
Generate Spectral Brewer palette of a given size . |
Style Bypasses¶
Functions for getting and setting BYPASS values for visual properties, organized into sections:
General functions for setting/clearing node, edge and network properties
Specific functions for setting particular node, edge and network properties
NOTE: The CyREST ‘bypass’ endpoint is essential to properly set values that will persist for a given network independent of applied style and style changes, and from session to session if saved.
General Style Bypasses¶
|
Set Node Property Bypass. |
|
Set Edge Property Bypass. |
Node Style Bypasses¶
|
Clear Node Opacity Bypass. |
|
Clear Node Property Bypass. |
|
Hide Nodes. |
|
Hide Selected Nodes. |
|
Override the border color for particular nodes. |
|
Override the border opacity for particular nodes. |
|
Override the border width for particular nodes. |
|
Set the bypass value for fill color for the specified node or nodes. |
|
Override the fill opacity for particular nodes. |
|
Override the font face for particular nodes. |
|
Override the font size for particular nodes. |
|
Override the height for particular nodes. |
|
Override the label for particular nodes. |
|
Override the label color for particular nodes. |
|
Override the label opacity for particular nodes. |
|
Set the bypass value for node fill, label and border opacity for the specified node or nodes. |
|
Override the shape for particular nodes |
|
Set Node Size Bypass. |
|
Sets a bypass tooltip for one or more nodes. |
|
Override the width for particular nodes. |
|
Unhide Nodes. |
Edge Style Bypasses¶
|
Clear Edge Property Bypass. |
|
Hide Edges. |
|
Hide Selected Edges. |
|
Set the bypass value for fill color for the specified edge or edges. |
|
Override the font face for particular edges. |
|
Override the font size for particular edges. |
|
Override the label for particular edges. |
|
Override the label color for particular edges. |
|
Override the label opacity for particular edges. |
|
Override the style for particular edges. |
|
Override the width for particular edges. |
|
Override the opacity for particular edges. |
Override the target arrow color for particular edges. |
|
Override the source arrow shape for particular edges. |
|
Override the target arrow color for particular edges. |
|
Override the target arrow shape for particular edges. |
|
|
Sets a bypass tooltip for one or more edges. |
|
Unhide Edges. |
Network Style Bypasses¶
|
Clear the bypass value for center x and y for the network, effectively restoring prior default values. |
|
Clear Network Property Bypass. |
|
Clear the bypass value for the scale factor for the network, effectively restoring prior default values. |
|
Set the bypass value for center x and y for the network. |
|
Set Network Property Bypass. |
|
Set the bypass value for scale factor for the network. |
|
Unhide all previously hidden nodes and edges, by clearing the Visible property bypass value. |
Style Defaults¶
Functions for getting and setting DEFAULT values for visual properties, organized into sections:
General functions for setting node, edge and network defaults
Specific functions for setting particular node, edge and network defaults
General Style Defaults¶
|
Retrieve the default value for a visual property. |
|
Set the default value for a visual property. |
|
Update the default values of visual properties in a style. |
Custom Graphics¶
|
Remove Node Custom Graphics. |
|
Set Node Custom Bar Chart. |
|
Set Node Custom Box Chart. |
|
Set Node Custom HeatMap Chart. |
|
Set Node Custom Line Chart. |
|
Set Node Custom Linear Gradient. |
|
Set Node Custom Pie Chart. |
|
Set Node Custom Position. |
|
Set Node Custom Radial Gradient. |
|
Set Node Custom Ring Chart. |
Node Style Defaults¶
Retrieve the default selection node color. |
|
|
Set the default node border color. |
|
Set defaults opacity value for all unmapped node borders. |
|
Set the default node border width. |
|
Set the default node color. |
|
Set default opacity value for all unmapped nodes. |
|
Set the default node font. |
|
Set the default node font size. |
|
Set the default node height. |
|
Set the default node label color. |
|
Set the default node label. |
|
Set default opacity value for all unmapped node labels. |
|
Set the default node border color. |
|
Set the default node shape. |
|
Set the default node font size. |
|
Set the default node tooltip. |
|
Set the default node width. |
Edge Style Defaults¶
Retrieve the default selected edge color. |
|
|
Set the default edge color. |
|
Set the default edge font. |
|
Set the default edge font size. |
|
Set the default edge label color. |
|
Set the default edge label. |
|
Set default opacity value for all unmapped edges. |
|
Set the default edge style. |
|
Set the default edge width. |
|
Set default opacity value for all unmapped edges. |
|
Set the default selected edge color. |
|
Set the default edge source arrow color. |
|
Set the default edge source arrow shape. |
|
Set the default edge target arrow color. |
|
Set the default edge target arrow shape. |
|
Set the default edge tooltip. |
Network Style Defaults¶
|
Retrieve the default background color. |
|
Set the default background color. |
Style Dependencies¶
# Functions for getting and setting style DEPEDENDENCIES, organized into sections:
General functions for getting and setting dependencies
Specific functions for setting particular dependencies
General Style Dependencies¶
|
Get the values of dependencies in a style. |
|
Set the values of dependencies in a style, overriding any prior setting. |
Custom Graphics¶
|
Set a boolean value to have the size of custom graphics match that of the node. |
Node Style Dependencies¶
|
Set a boolean value to have node width and height fixed to a single size value. |
Edge Style Dependencies¶
|
Set a boolean value to have arrow shapes share the same color as the edge. |
Style Mappings¶
Functions for defining MAPPINGS between table column values and visual properties, organized into sections:
General functions for creating and applying mappings for node, edge and network properties
Specific functions for defining particular node, edge and network properties
See style_auto_mappings for automatic mapping generation
General Style Mappings¶
|
Delete a specified visual style mapping from specified style. |
|
Fetch all visual property mapping in a style. |
|
Fetch a visual property mapping in a style. |
|
Create a mapping between an attribute and a visual property. |
|
Update a visual property mapping in a style. |
Node Style Mappings¶
|
Map table column values to colors to set the node border color. |
|
Set opacity for node border only. |
|
Map table column values to widths to set the node border width. |
|
Map table column values to colors to set the node fill color. |
|
Set opacity for node fill, border and label all together. |
|
Set opacity for node fill only. |
|
Sets font face for node labels. |
|
Map table column values to sizes to set the node size. |
|
Map table column values to the node heights. |
|
Map table column values to colors to set the node border color. |
|
Pass the values from a table column to display as node labels. |
|
Sets opacity for node label only. |
|
Map table column values to shapes to set the node shape. |
|
Map table column values to node sizes. |
|
Pass the values from a table column to display as node tooltips. |
|
Map table column values to the node widths. |
Edge Style Mappings¶
|
Map table column values to colors to set the edge color. |
|
Sets font face for edge labels. |
|
Map table column values to sizes to set the edge size. |
|
Map table column values to colors to set the edge border color. |
|
Pass the values from a table column to display as edge labels. |
|
Sets opacity for edge label only. |
|
Map table column values to styles to set the edge style. |
|
Map table column values to widths to set the node border width. |
|
Map table column values to opacities to set the edge opacity. |
|
Map table column values to colors to set the source arrow color. |
|
Map table column values to shapes to set the source arrow shape. |
|
Map table column values to colors to set the source arrow color. |
|
Map table column values to colors to set the target arrow color. |
|
Map table column values to shapes to set the target arrow shape. |
|
Map table column values to colors to set the target arrow color. |
|
Pass the values from a table column to display as edge tooltips. |
Style Values¶
Functions for retrieving current values for visual properties.
General functions for getting node, edge and network properties
Specific functions for getting particular node, edge and network properties
Node Style Values¶
|
Retrieve the actual fill color of specified nodes. |
|
Retrieve the actual height of specified nodes. |
|
Retrieve the actual x,y position of specified nodes. |
|
Get values for any node property of the specified nodes. |
|
Retrieve the actual size of specified nodes. |
|
Retrieve the actual width of specified nodes. |
Edge Style Values¶
|
Retrieve the actual line color of specified edges. |
|
Retrieve the actual line style of specified edges. |
|
Retrieve the actual line width of specified edge. |
|
Get values for any edge property of the specified edges. |
|
Retrieve the actual target arrow shape of specified edges. |
Network Style Values¶
|
Retrieve the center of specified network. |
|
Get values for any network property. |
|
Retrieve the scale factor of specified network. |