diff --git a/demos/demos_databases_apis/graphviz/graphviz.ipynb b/demos/demos_databases_apis/graphviz/graphviz.ipynb index 6dd0269b1a..72f6ac01cb 100644 --- a/demos/demos_databases_apis/graphviz/graphviz.ipynb +++ b/demos/demos_databases_apis/graphviz/graphviz.ipynb @@ -6,9 +6,13 @@ "id": "fEjoJ5eBnuKZ" }, "source": [ - "# Graphistry <> graphviz integration quickstart\n", + "# Graphviz Layouts for Graphistry Visualization\n", "\n", - "The [graphviz engine](https://graphviz.org/) is popular for layout of small graphs and rendering to static images. The Graphistry Python bindings to graphviz enable using pygraphistry as usual for quickly loading and manipulating your data, and then benefiting from graphviz for layout, and optionally, rendering.\n", + "The [graphviz engine](https://graphviz.org/) is popular for high-quality layout of small graphs, especially trees and directed acyclic graphs (DAGs).\n", + "\n", + "This notebook shows how to use graphviz for **layout**, then visualize interactively with Graphistry's GPU-accelerated renderer.\n", + "\n", + "**For static image export** (SVG, PNG for docs/reports), see the [static_rendering.ipynb](static_rendering.ipynb) notebook.\n", "\n", "The example below shows laying out and rendering company ownership data that is in a tree and benefits from graphviz's high-quality layout engine." ] @@ -33,24 +37,21 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 1, "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, + "execution": { + "iopub.execute_input": "2025-12-10T07:05:22.280959Z", + "iopub.status.busy": "2025-12-10T07:05:22.280803Z", + "iopub.status.idle": "2025-12-10T07:05:22.283760Z", + "shell.execute_reply": "2025-12-10T07:05:22.283115Z" + }, "id": "3XMNgAvIM9Ep", "outputId": "b391eb13-0650-433b-bd2b-c905cdef9e18" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", - " Building wheel for graphistry (setup.py) ... \u001b[?25l\u001b[?25hdone\n" - ] - } - ], + "outputs": [], "source": [ "#!apt-get install graphviz graphviz-dev\n", "\n", @@ -68,46 +69,34 @@ }, { "cell_type": "code", - "execution_count": 102, + "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 35 }, + "execution": { + "iopub.execute_input": "2025-12-10T07:05:22.285848Z", + "iopub.status.busy": "2025-12-10T07:05:22.285652Z", + "iopub.status.idle": "2025-12-10T07:05:24.152836Z", + "shell.execute_reply": "2025-12-10T07:05:24.152154Z" + }, "id": "Cnhc-A4_M2Ad", "outputId": "0f2fb73f-72a2-4fae-9b28-cea26b85d0ad" }, "outputs": [ { "data": { - "application/vnd.google.colaboratory.intrinsic+json": { - "type": "string" - }, "text/plain": [ - "'0.34.5+12.g4dba3e6'" + "'0+unknown'" ] }, - "execution_count": 102, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], - "source": [ - "from typing import Any, Dict, Literal, Optional\n", - "import logging\n", - "try:\n", - " import pygraphviz as pgv\n", - "except (ImportError, ModuleNotFoundError):\n", - " logging.error(\"ImportError: Did you install pygraphviz and the supporting native packages?\")\n", - " raise\n", - "\n", - "import pandas as pd\n", - "import graphistry\n", - "from graphistry import Plottable\n", - "graphistry.register(api=3, username=FILL_ME_IN, password=FILL_ME_IN)\n", - "\n", - "graphistry.__version__" - ] + "source": "from typing import Any, Dict, Literal, Optional\nimport logging\ntry:\n import pygraphviz as pgv\nexcept (ImportError, ModuleNotFoundError):\n logging.error(\"ImportError: Did you install pygraphviz and the supporting native packages?\")\n raise\n\nimport pandas as pd\nimport graphistry\nfrom graphistry import Plottable\ngraphistry.register(api=3, username=FILL_ME_IN, password=FILL_ME_IN)\n\ngraphistry.__version__" }, { "cell_type": "markdown", @@ -122,8 +111,14 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": { + "execution": { + "iopub.execute_input": "2025-12-10T07:05:24.196306Z", + "iopub.status.busy": "2025-12-10T07:05:24.195989Z", + "iopub.status.idle": "2025-12-10T07:05:24.203292Z", + "shell.execute_reply": "2025-12-10T07:05:24.202546Z" + }, "id": "8-7OAzDml0RV" }, "outputs": [], @@ -161,8 +156,14 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 4, "metadata": { + "execution": { + "iopub.execute_input": "2025-12-10T07:05:24.205170Z", + "iopub.status.busy": "2025-12-10T07:05:24.204950Z", + "iopub.status.idle": "2025-12-10T07:05:24.208318Z", + "shell.execute_reply": "2025-12-10T07:05:24.207591Z" + }, "id": "7TmvBE5iI8Tu" }, "outputs": [], @@ -172,8 +173,14 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 5, "metadata": { + "execution": { + "iopub.execute_input": "2025-12-10T07:05:24.210087Z", + "iopub.status.busy": "2025-12-10T07:05:24.209895Z", + "iopub.status.idle": "2025-12-10T07:05:24.213687Z", + "shell.execute_reply": "2025-12-10T07:05:24.212914Z" + }, "id": "y7eC5hOCwfE1" }, "outputs": [], @@ -196,12 +203,18 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 6, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 543 }, + "execution": { + "iopub.execute_input": "2025-12-10T07:05:24.215732Z", + "iopub.status.busy": "2025-12-10T07:05:24.215530Z", + "iopub.status.idle": "2025-12-10T07:05:26.814150Z", + "shell.execute_reply": "2025-12-10T07:05:26.813498Z" + }, "id": "KiOxkJR_YKrh", "outputId": "2b9af5e5-b199-452a-839b-d8cc7cc0ea50" }, @@ -210,7 +223,7 @@ "data": { "text/html": [ "\n", - "