py4cytoscape.style_defaults.set_node_custom_bar_chart

set_node_custom_bar_chart(columns, type='GROUPED', colors=None, range=None, orientation='VERTICAL', col_axis=False, range_axis=False, zero_line=False, axis_width=0.25, axis_color='#000000', axis_font_size=1, separation=0.0, slot=1, style_name=None, base_url='http://127.0.0.1:1234/v1')[source]

Set Node Custom Bar Chart.

Makes a bar chart per node using specified node table columns by setting a default custom graphic style.

Parameters
  • columns (list) – List of node column names to be displayed, in order.

  • type (str) – Type of bar chart: GROUPED (default), STACKED, HEAT_STRIPS, or UP_DOWN

  • colors (list) – List of colors to be matched with columns or with range, depending on type. Default is a set of colors from an appropriate Brewer cy_palette.

  • range (list) – Min and max values of chart. Default is to use min and max from specified data columns.

  • orientation (str) – HORIZONTAL or VERTICAL (default).

  • col_axis (bool) – Show axis with column labels. Default is False.

  • range_axis (bool) – Show axis with range of values. Default is False.

  • zero_line (book) – Show a line at zero. Default is False.

  • axis_width (float) – Width of axis lines, if shown. Default is 0.25.

  • axis_color (str) – Color of axis lines, if shown. Default is black (‘#000000’).

  • axis_font_size (int) – Font size of axis labels, if shown. Default is 1.

  • separation (float) – Distance between bars. Default is 0.0.

  • slot (int) – Which custom graphics slot to modify. Slots 1-9 are available for independent charts, gradients and images. Default is 1.

  • style_name (str) – Name of style; default is “default” style

  • base_url (str) – Ignore unless you need to specify a custom domain, port or version to connect to the CyREST API. Default is http://localhost:1234 and the latest version of the CyREST API supported by this version of py4cytoscape.

Returns

’’

Return type

str

Raises
  • CyError – if style name, chart type or slot doesn’t exist

  • requests.exceptions.RequestException – if can’t connect to Cytoscape or Cytoscape returns an error

Examples

>>> set_node_custom_bar_chart(['AverageShortestPath', 'BetweennessCentrality'], style_name='galFiltered Style')
''
>>> set_node_custom_bar_chart(['AverageShortestPath', 'BetweennessCentrality'], colors=['#FF00FF', '#00FF00'], slot=2, style_name='galFiltered Style')
''
>>> set_node_custom_bar_chart(['AverageShortestPath', 'BetweennessCentrality'], colors=['red', 'green'], axis_color='blue', slot=2, style_name='galFiltered Style')
''