Skip to content

Commit 14c5353

Browse files
committed
Docs: Add hypergraph example with edge weights to visualize_graph usage section
1 parent 0ad557c commit 14c5353

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The main tool, `visualize_graph`, now accepts a single `graph_data` dictionary.
118118
```python
119119
{
120120
"graph_data": {
121-
"data_format": "edge_list",
121+
"graph_type": "graph",
122122
"edges": [
123123
{"source": "A", "target": "B"},
124124
{"source": "A", "target": "C"},
@@ -140,6 +140,25 @@ The main tool, `visualize_graph`, now accepts a single `graph_data` dictionary.
140140
}
141141
```
142142

143+
Example (hypergraph):
144+
145+
```python
146+
{
147+
"graph_data": {
148+
"graph_type": "hypergraph",
149+
"edges": [
150+
{"source": "A", "target": "B", "group": "G1", "weight": 0.7},
151+
{"source": "A", "target": "C", "group": "G1", "weight": 0.6},
152+
{"source": "B", "target": "C", "group": "G2", "weight": 0.8},
153+
{"source": "A", "target": "D", "group": "G2", "weight": 0.5}
154+
],
155+
"columns": ["source", "target", "group"],
156+
"title": "Test Hypergraph",
157+
"description": "A simple test hypergraph."
158+
}
159+
}
160+
```
161+
143162
### What We Learned / Caveats & Gotchas
144163

145164
- **Environment Variables & .env:** Always ensure `GRAPHISTRY_USERNAME` and `GRAPHISTRY_PASSWORD` are set in the environment or `.env` file. The server loads `.env` automatically using `python-dotenv`.

0 commit comments

Comments
 (0)