Dash Cytoscape

from dash import Dash, html
import dash_cytoscape as cyto

app = Dash(__name__)

app.layout = html.Div([
        layout={'name': 'preset'},
        style={'width': '100%', 'height': '400px'},
            {'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 75, 'y': 75}},
            {'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}},
            {'data': {'source': 'one', 'target': 'two'}}

if __name__ == '__main__':

Dash Cytoscape graphs are interactive! Scroll to zoom and drag on
the canvas to move the entire graph around. You can move nodes by
dragging it, or by clicking, holding, and moving your mouse
to the desired location (and click again to release).

This also work in mobile! Tap-and-hold on a node to move it, or on
the canvas to move the entire graph. Pinch your fingers outwards to
zoom in, or pinch them together to zoom out.

Dash Cytoscape User Guide


A comprehensive list of all of the Cytoscape properties.

Basic Usage & Elements

Overview of element declaration and manipulation.


Description of built-in layouts, and how to modify their properties. These include:


Methods to style elements with a CSS-like syntax. These include:


Methods to combine Dash callbacks to update your Cytoscape object. These include:

Events and User Interactions

Overview of user-interaction events that trigger callbacks in Dash, and how to use them to update the Cytoscape component.

Biopython Examples

Examples of applications in bioinformatics using Biopython. These include:

Exporting Images

This example shows how to export your Cytoscape graphs as images (jpg, png, svg).

Making responsive graphs

This example shows how to build a responsive Cytoscape graph.