py4cytoscape.style_bypasses.set_network_center_bypass

set_network_center_bypass(x, y, bypass=False, network=None, base_url='http://127.0.0.1:1234/v1')[source]

Set the bypass value for center x and y for the network.

This function could be used to pan and scroll the Cytoscape canvas.

This method permanently overrides any default values for this visual property. This method ultimately calls the generic function, set_network_property_bypass(), which can be used to set any visual property. To restore defaults, use clear_network_property_bypass().

Parameters
  • x (float) – Coordinate value, increases going to the right.

  • y (float) – Coordinate value, increases going to the down.

  • bypass (bool) – Whether to set permanent bypass value. Default is False per common use of temporary zoom settings.

  • network (SUID or str or None) – Name or SUID of a network. Default is the “current” network active in Cytoscape.

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

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

Examples

>>> set_network_center_bypass(1.5, bypass=True)
''
>>> set_network_center_bypass(0.25, bypass=True, network='galFiltered.sif')
''

See also

set_network_property_bypass(), clear_netowrk_property_bypass()