How to Visualize Ontologies Guide and demo
Ontologies structure knowledge as subject–predicate–object triples, allowing flexible schema evolution that mirrors how knowledge itself changes. Academic research identifies persistent challenges in ontology visualization: graph complexity and readability, interactive exploration at scale, and the need for multi-perspective views.
Large-scale knowledge management depends on extensive graphs and clear domain-specific frameworks to handle semantic complexity. yFiles strengthens ontology engineering by revealing key concepts, relationships, and structural patterns through advanced, customizable layout algorithms, offering a level of clarity and interactivity that typical ontology editors can’t match.

The database landscapeUnderstanding triple stores and graph-based approaches
Relational databases come in all shapes and sizes, from lightweight SQLite to DB2 on mainframes, Oracle 19, and MySQL. What they share is the need for a predefined table structure, or schema. Before any data can be stored, one must define the types of data, how they’re organized, their names (tables and fields), and their relationships (foreign keys). In large enterprise systems, schema design can become a full-scale project, requiring both a strong grasp of the business context and deep technical expertise in database mechanics such as indexing and partitioning.
Yet the database world extends far beyond the relational model. The broader data storage ecosystem is a dense landscape of key-value stores, document stores, graph databases, time-series databases, hybrid architectures, and cloud-native systems. Graph databases, in particular, have surged in popularity and now span a diverse range of approaches. These can be broadly categorized into property graphs, triple stores, and hybrid systems, topics explored in more depth in another article. Here, we’ll focus briefly on the mechanics of triple stores.
Triple stores The foundation of ontology visualization
Let’s take the simple statement "Anna owns a Toyota". This can graphically be represented like so:
One distinguishes three parts here: an endpoint representing Anna, an endpoint representing a Toyota, and an edge with the label "owns a". In triple language one speaks of an SPO triple; Anna is the Subject (S), the Toyota is the Object (O), and the edge is the Predicate (P). This structure can naturally be extended to capture more facts:
Each statement forms a simple triple, and together they build a stack of interconnected facts.
- Anna - (owns a) → Toyota
- Anna - (works at) → yWorks
- Anna - (uses a) → Yellow umbrella
These can be stored, indexed, and queried efficiently. That’s the essence of a triple store.
Note the simplicity of this model:
- There’s no need to define in advance what kind of data you’ll store, each triple is simply a set of three strings.
- Parsing and indexing triples is fast and efficient.
- Multiple relationships between the same entities are handled naturally, just add more triples.
The first point is key: Unlike relational systems, triple stores don’t require a predefined schema or rigid structure. In that sense, they’re schema-less, without a predefined structure, much like modern NoSQL databases. But anyone who has worked with large-scale NoSQL data knows the trade-offs:
- Without structure, data can quickly become an amorphous collection of facts.
- Maintaining data integrity becomes a challenge.
- Without a schema, different users may represent the same information inconsistently or ambiguously.
About yFiles: The graph visualization SDK

yFiles is your go-to SDK for crafting advanced graph visualizations, whether you're working with Web, Java, or .NET technologies. Its unmatched flexibility and scalability enable you to convert complex data into clear, actionable visuals, fitting for both enterprise and startup needs.
With yFiles, you're equipped for the future—supporting any data source while maintaining strong data security. Getting started is seamless, thanks to over 300 source-code demos, thorough documentation, and direct access to core developer support. These resources are available even during your free trial.
Backed by 25 years of graph drawing expertise, yFiles is trusted by top companies worldwide for their most critical visualization tasks.
Discover yFiles11 reasons why developers choose yFiles, the superior diagramming SDK
yFiles Newsletter
Stay informed about yFiles, network visualization, and graph technology updates.
Join our newsletter
We´d love to help you. Reach out and we'll get in touch with you.
Your message has been sent.
What is an ontology?
When working with triples, ambiguity quickly creeps in.
- Somebody might say, "Anna owns a Toyota," while another might say, "Anna is driving a Toyota."
- When changing "yellow umbrella" to "red umbrella", you first need to confirm that an umbrella object exists, but which predicate applies? "uses", "carries", or something else?
- You can’t simply delete an endpoint either; it might be referenced elsewhere.
Without a shared framework, these inconsistencies multiply. Large-scale knowledge management needs structure and agreement, this is where ontologies come in. In other words: ontologies bring order and semantics to chaos.
An ontology is a formal description of how concepts relate within a specific domain, it defines the categories, properties, and relationships that structure knowledge. In practice, it describes a portion of the world, such as cancer research, forensic analysis, or molecular properties.
Returning to the earlier example, we can generalize it into abstract relationships:
- Person - (owns a) → Car
- Person - (works at) → Company
- Person - (uses an) → Umbrella
Here, Person, Car, and Company are classes, conceptual categories within the ontology, the concrete examples, like Anna, Toyota, or yWorks, are instances (or individuals) of those classes.
PropertiesAdding data to entities
The relations emanating from the classes can be divided into two categories: Things which link two classes and things which adorn a class. For example, a Person has a birthdate and a shoe size, but usually, these properties are not considered worth a class "Birthdate" or a class "ShoeSize". One can also see it like this: Some things around us have a complex sub-structure while others don’t. Usually, one does not assign a complex sub-structure to a number, but one does to a car. Hence, things that can be described by simple data types (number, date, string, ...) are called data-type properties.
Properties that point to something more complex are called object properties. The concept "age of a person" is a data property while "owns a car" is an object property. The distinction is not always easily made, and this is where domain experts come in. For example, a person has an address, and this can be stored as a simple string or as a structured object (separating postal code, address-line, ... into separate properties). Whether one shape is right or wrong depends on the global context and aim of the data. It’s also not uncommon to start with a data-type and months later moving on to an object. The situation is, in fact, true for any schema: It evolves together with the software and increasing complexity of the data.
Querying triple stores
Triple data uses a specialized query language called SPARQL. Similar to SQL but designed for graph-structured data, SPARQL enables efficient retrieval of triples and subgraphs. While every triple storage system implements the SPARQL standard, each adds its own custom query functions on top of it. Beyond SPARQL, however, triple stores differ significantly in their feature sets, and the technology landscape continues to evolve rapidly. The same variability applies to data access frameworks built around SPARQL, quality and sophistication vary considerably across package repositories. Currently, Java offers the most mature and comprehensive tooling for large-scale implementations.
A note on ontologies versus taxonomies. Ontologies are frequently confused with taxonomic hierarchies, but they're fundamentally different. A taxonomy is essentially a naming system, a structured set of labels typically organized as a tree. This tree structure often oversimplifies reality by ignoring that entities can have multiple parents, forming graphs rather than simple trees. Taxonomies remain popular precisely because trees are far easier to work with and visualize than graphs, even when they sacrifice accuracy for convenience.
Representation of ontologies
This brings us to representations of ontologies and how it relates to graph stores. From the discussion above, it should be clear that an ontology is itself a bunch of triples. This is a big contrast with the relational world where schema and data are two very different things in a database. Not so in a triple store: The schema and the data are next to each other, and they are indistinguishable on the data level. Even more, you can have multiple ontologies inside a database. This can be an advantage, but it’s often the ugly aspect of triple store solutions; There isn’t a triple store that enforces the defined ontology. Read again: You can add an ontology to your triple store, but it will not be used to enforce the data to behave accordingly. Some hybrid solutions like TypeDB fix this, but most vendors do not. The implications are many, but we go deeper into this in another article. Note that, because an ontology is a set of triples, you can construct and manipulate an ontology like any other triple data. Using the SPARQL query language, you can uniformly approach data and ontologies within the very same queries. It allows one to dynamically alter a schema and its related data, something totally alien to the relational world.
Ontologies in practice
Ontologies are widely used across various domains. A prominent example is DBpedia a knowledge graph that extracts structured information from Wikipedia and stores it as semantic triples. The DBpedia ontology captures intuitive relationships we understand naturally, for instance, people can have children, while cars cannot.
In the biomedical field, BioPortal stands out as the largest open ontology repository, containing approximately ten million classes covering various aspects of biomedicine.
For ontology development, software tools are relatively limited. Protégé developed at Stanford University, is the most widely adopted ontology editor. It handles small to medium-sized ontologies effectively and is available as open-source software.
While creating ontologies requires specialized tools, visualizing them is more straightforward. We've built a demonstration application that shows how ontology visualization works in practice.
Working with triple stores in the yFiles playground
This playground shows a small, interactive knowledge graph and how ontologies are explored.
graph.nodeDefaults.size = [70, 70];
graph.nodeDefaults.style = new ShapeNodeStyle({
shape: ShapeNodeShape.ELLIPSE,
cssClass: "node",
});
graph.nodeDefaults.labels.style = new LabelStyle({
shape: LabelShape.PILL,
backgroundFill: "white",
backgroundStroke: "1px solid #6A8293",
font: "15px poppins",
textFill: "#6A8293",
});
graph.edgeDefaults.labels.style = new LabelStyle({
shape: LabelShape.PILL,
backgroundFill: "#6A8293",
backgroundStroke: "1px solid white",
font: "15px poppins",
textFill: "white",
});
graphComponent.fitGraphBounds()Ontologies and Artificial Intelligence
Ontologies play a vital role in enhancing artificial intelligence by providing a structured way to understand complex data.
Ontologies enhance artificial intelligence by providing structured frameworks for representing and reasoning about complex domains. While conventional AI systems often focus on simple pattern recognition, ontologies enable deeper semantic understanding through explicit modeling of concepts and their interrelationships, a critical capability in fields like biomedicine, data science, and industrial design where domain complexity is high.
Key benefits of using ontologies in AI include:
- Improved semantic understanding by clearly defining concepts and their relationships.
- Enhanced data integration across various domains.
- Greater reasoning capabilities in AI systems.
- Ability to visualize complex data structures as interactive graphs, revealing hidden patterns.
- Facilitation of knowledge management and exploration through dynamic and scalable solutions.
By leveraging tools like the yFiles SDK for visual ontology representation, developers can create effective AI solutions that advance beyond basic pattern recognition, leading to more intelligent and intuitive systems.
This diagram outlines the process of enhancing AI systems with ontologies.
It begins with Data Collection, where raw data is gathered from various sources, followed by Data Annotation, which involves tagging data for ontology creation.
Subsequently, Ontology Creation defines the key concepts and relationships, while Data Integration merges annotated data into a unified structure. In the AI Modeling phase, models utilize the ontology to process data, followed by Model Adjustment, where models are refined using insights from the ontology.
Finally, Results & Insights are attained, demonstrating the improved capabilities of AI systems when utilizing ontologies.
Building an ontology visualizer
yFiles is a commercial programming library designed explicitly for diagram visualization and is a perfect fit for the challenges of ontology visualization. It provides an extensive set of predefined styles for visualizing the elements of a network, while it also supports the creation of user-defined custom styles. yFiles comes with a complete set of layout algorithms for arranging the graph based on the user’s needs. These sophisticated algorithms organize the network to produce a clear and concise diagram.
Building on these powerful diagramming features, assembling an ontology visualizer with yFiles is indeed a walk in the park. The most challenging part is the data access to fetch the triples and hand them over to the yFiles framework (the GraphBuilder in the case of yFiles for HTML to be precise). This part is specific to your environment (Java, .NET, NodeJS, ...). Every ecosystem has its own stack of packages to approach data and triples in particular. Also, triple storage systems differ widely with respect to features, scalability, and enterprise readiness.

On the other hand, if you wish to experiment with triples and ontologies, you don’t need to crack a safe. Apache Fuseki is an easy to install cross-platform triple store, and the Protégé application mentioned above uses a simple file system. To make things easy, our yFiles for HTML-based visualizer sample application does not require any setup at all. It relies on a key-value storage system what every browser is using to store information. Just run and experiment. Some of the more salient features you will find in this application are:
- The possibility to use an excellent set of layout algorithms from yFiles. While there are various good-looking ontology visualizers out there in the open, none of them have much to offer in terms of graph layout. Usually, they rely on a simple spring-embedder algorithm that fails to deliver with large diagrams and multiple edges between nodes. No complex tuning or parameterization was necessary to achieve this, whatsoever.
- The integrated graph analysis algorithms allow you to gain insight into the ontological structure. Using centrality measures reveals hidden aspects of the ontology. This is a unique feature that cannot be found in any other ontology tool.
- Similarly, one can create clusters and box ontology classes together to define ontological sub-domains, which, in principle, can be extracted into separate ontologies.
Of course this is not where it ends. The above application is just a small sample application created within just a few days of work. However this should give you an idea already of the possibilities you get with a custom diagramming library like yFiles:
- Use any type of data-source and technology stack to connect to your data-sources.
- Let your users not just view, but manipulate, edit, or create your ontologies using intuitive, specific, and supportive diagram editing features.
- Connect your application to third-party systems (e.g. to run inference engines).
- Embed your ontology visualization into your own existing or newly created app, dashboard, or website.
So what are you waiting for? Try the sample app or start creating your own with yFiles, today!
Access the source code
The source code of the Ontology Visualizer demo application is available on GitHub. See the included readme file for usage instructions and implementation notes.
You need a copy of the yFiles for HTML diagramming library in order to run this application. You can download a free test version of yFiles in the yWorks Customer Center.
Recap
Visualizing an ontology
Ontology visualization is an essential approach to managing and understanding complex knowledge structures by representing abstract concepts, domain-specific entities, and their relationships as interactive graphs. Unlike traditional databases with rigid schemas, ontologies use a flexible triple-based model (subject-predicate-object) well suited for capturing intricacies and semantic richness across knowledge domains in fields such as biomedicine, data science, and industrial design.
The yFiles SDK provides advanced capabilities for ontology visualization, supporting automatic graph layouts, custom styles, and rich interaction features. By integrating yFiles, developers can build high-performance ontology visualizers that arrange dense networks into clear, readable diagrams and enable deep exploration and editing. Its built-in layout algorithms and graph analysis tools make it possible to reveal class clusters, subdomains, and hidden structural patterns, while supporting live data from triple stores or APIs. Developers can easily customize the look, interaction, and data integration of the visualizer to suit any domain, as illustrated in the section on creating your own ontology visualizer.
For hands-on experience and implementation guidance, see the Ontology Visualizer Source Code or explore more in-depth features with dedicated yFiles resources.
Related content
Got questions about
visualizing an ontology?
Email: hello@yworks.com
Phone: +49 7071 9709050