semantica.visualization renders knowledge graphs, ontologies, embedding spaces, and temporal data as interactive HTML or static images: without launching the full Explorer server:
  • KGVisualizer: interactive network with force, hierarchical, and circular layouts
  • EmbeddingVisualizer: 2D/3D UMAP or t-SNE projections with cluster labels
  • TemporalVisualizer: timeline views and graph evolution across snapshots
  • AnalyticsVisualizer: centrality scores, community structure, degree distribution charts
Requires plotly: pip install plotly. Some exporters also need matplotlib or graphviz.

Exported Classes

Quick Start

1

Render a knowledge graph

2

Apply layout and color options

3

Export to static formats

plotly is required for all visualizers. Install before use: pip install plotly. All visualizer methods raise ProcessingError if Plotly is not installed.

Visualizers

Interactive and static knowledge graph rendering:
Use max_nodes for large graphs. Force-directed layouts become unreadable and slow above ~1,000 nodes. Filter to a subgraph before visualizing large graphs.
HTML output is always the best starting point. Interactive HTML lets you zoom, pan, and hover for details. Only export to PNG/SVG/PDF when embedding in a report.
For interactive dashboards, prefer Explorer. KGVisualizer.visualize_network() generates a self-contained HTML file. The Explorer CLI (semantica-explorer) gives a full live web app with search, filtering, path-finding, and REST API.
Layout options (layout=):

Color Schemes

All visualizers accept a color_scheme= constructor parameter:
Use color_scheme="colorblind" in publications and dashboards. The Okabe-Ito palette is readable for everyone, including the ~8% of readers who are red-green colorblind.

Export Formats

Convenience Functions

Graph Explorer (Full Dashboard)

For a full browser-based UI with search, path finding, and the Ontology Hub, launch the Explorer CLI:
See the Explorer reference for the full feature set and REST API.
  • Knowledge Graph — The graph being visualized.
  • Ontology — Visualize ontology class structure.
  • Embeddings — Generate the embeddings visualized here.
  • Explorer — Full interactive Knowledge Explorer UI.