Loading...
Loading...
Build PyGraphistry visualizations with bindings, encodings, layout controls, static export, and privacy-aware sharing. Use for color/size/icon/badge styling, layout tuning, map/static output, and plot link sharing workflows.
npx skill4agent add graphistry/graphistry-skills pygraphistry-visualization../pygraphistry/references/pygraphistry-readthedocs-toc.md../pygraphistry/references/pygraphistry-readthedocs-top-level.tsv../pygraphistry/references/pygraphistry-readthedocs-sitemap.xmlcat *references/fa-icons.mdhttps://pygraphistry.readthedocs.io/en/latest/...g2 = (
# Keep a plain 'type' column on both nodes and edges for legend-friendly defaults
g.bind(point_label='label', point_color='type', edge_color='type')
.encode_point_color('type', categorical_mapping={'agent': '#3b82f6'}, default_mapping='#94a3b8')
# Optional: default node sizing is often degree for exploratory passes
.encode_point_size('degree')
.settings(url_params={'play': 3000, 'info': True})
)
g2.plot()# nodes_df contains x/y layout columns
g2 = graphistry.edges(edges_df, 'src', 'dst').nodes(nodes_df, 'id').bind(point_x='x', point_y='y').settings(url_params={'play': 0})
g2.plot()settings(url_params={...})| Param | Type | Default | Range | Description |
|---|---|---|---|---|
| int | 5000 | 0-10000 (0, 1000, 2000, 5000) | Layout duration ms. 0=fixed |
| bool | false | Lock X axis (with | |
| bool | false | Lock Y axis (with | |
| bool | false | Lock radial position | |
| bool | false | Strong separation; good for <1000 nodes | |
| float | 1.0 | 0.1-10 (0.5, 1, 2, 5) | Expansion ratio. Combine with |
| bool | false | Compact layout with pull to center | |
| bool | false | Reduce hub dominance in layout | |
| float | 1.0 | 0.1-10 (0.1, 1, 2, 10) | Pull strength toward center |
| float | 1.0 | 0-10 (0, 0.7, 1, 2, 5, 7) | Edge weight impact on layout |
| float | 1.0 | 0.1-10 (0.1, 1, 10) | Higher=precise but slower |
| int | auto | Manual camera bounds on load |
| Param | Type | Default | Range | Description |
|---|---|---|---|---|
| float | 1.0 | 0.1-10 (0.3, 0.5, 1, 2, 3) | Point size multiplier (not encoding) |
| float | 1.0 | 0-1 (0.3, 0.5, 0.8, 1) | Node transparency |
| float | 0 | 0-5 (0, 1, 2) | Node border width |
| float | 0 | 0-1 (0, 0.5, 1) | Edge bending amount |
| float | 1.0 | 0-1 (0.3, 0.5, 0.8, 1) | Edge transparency |
| bool | true | Show edge direction arrows | |
| str | both | incoming/outgoing/both/node | Hover highlight mode |
| int | 1 | 1-5 (1, 2, 3) | Hops in hover highlight |
| Param | Type | Default | Range | Description |
|---|---|---|---|---|
| bool | true | Toggle all label visibility | |
| bool | true | Show labels only on hover | |
| bool | true | Highlight key nodes as POI | |
| bool | true | Show labels on POI nodes | |
| int | 5 | 0-100 (0, 5, 10, 20) | Max POIs. 0=disable |
| bool | true | Truncate long labels | |
| bool | false | Show extra properties on hover | |
| float | 1.0 | 0-1 (0.5, 0.8, 1) | Label transparency |
| str | hex no # (000000, FFFFFF) | Label text color | |
| str | hex no # (000000, FFFFFF) | Label bg color |
#encode_*palette#| Param | Type | Default | Description |
|---|---|---|---|
| bool | true | Show all menus |
| bool | true | Show graph size stats |
| bool | true | Show histogram panel |
| bool | true | Show entity inspector |
| bool | false | Show collections panel |
# Ring layout with strong separation for small graphs (<1000 nodes)
g2 = g.settings(url_params={'play': 3000, 'linLog': True, 'scalingRatio': 2.0})
# Fixed position layout (external coordinates)
g2 = g.bind(point_x='x', point_y='y').settings(url_params={'play': 0, 'lockedX': True, 'lockedY': True})
# Disable POI labels entirely
g2 = g.settings(url_params={'showLabels': False, 'pointsOfInterestMax': 0})
# Larger points, more transparent edges
g2 = g.settings(url_params={'pointSize': 3.0, 'edgeOpacity': 0.3})
# Minimal UI for embedding
g2 = g.settings(url_params={'menu': False, 'info': False, 'showHistograms': False, 'showInspector': False})g2 = (
g.encode_point_icon('type', categorical_mapping={'person': 'user', 'org': 'building'})
.encode_point_badge('risk', categorical_mapping={'high': 'exclamation-triangle'})
)
g2.plot()typereferences/fa-icons.mdg2 = g.encode_edge_color('amount', palette=['#46327e', '#1fa187', '#fde724'], as_continuous=True)
g2.plot()# Use GFQL slices to publish multiple focused views from one base graph (use .gfql(), not deprecated .chain())
high_risk = g.gfql([...]).name('high-risk-slice')
partner_flow = g.gfql([...]).name('partner-flow-slice')
urls = [high_risk.plot(render=False), partner_flow.plot(render=False)]graphistry.privacy(mode='private')
plot_url = g.plot(render=False)graphistry.privacy(mode='private'|'organization'|'public')plot()as_filesmemoizeencode_point_colorencode_edge_colorencode_point_sizeencode_point_iconencode_point_badgeplot_static()graphviz-dotmermaid-codegraphistry.privacy(mode='private'|'organization'|'public')palette=[...]as_continuous=Trueencode_point_colorencode_edge_colortypenode.typeedge.typereferences/fa-icons.md