py4cytoscape.style_defaults.update_style_defaults

update_style_defaults(style_name, defaults, base_url='http://127.0.0.1:1234/v1')[source]

Update the default values of visual properties in a style.

Updates visual property defaults, overriding any prior settings. See map_visual_property() for the list of visual properties.

Parameters
  • style_name (str) – name for style

  • defaults (dict) – a dict of visual property default settings

  • 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 doesn’t exist

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

Examples

>>> update_style_defaults('galFiltered Style', {'edge width': '50.0', 'EDGE_TARGET_ARROW_SHAPE': 'CIRCLE'})
''
>>> update_style_defaults(defaults={'node shape': 'OCTAGON', 'EDGE_LINE_TYPE': 'ZIGZAG'})
''

See also

map_visual_property()