---
title: "GraphNodes"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

A list of nodes in a graph with optional labels, colors, etc.

## Fields
### Required
* `node_ids`: [`GraphNode`](../components/graph_node.md)

### Optional
* `positions`: [`Position2D`](../components/position2d.md)
* `colors`: [`Color`](../components/color.md)
* `labels`: [`Text`](../components/text.md)
* `show_labels`: [`ShowLabels`](../components/show_labels.md)
* `radii`: [`Radius`](../components/radius.md)


## Can be shown in
* [GraphView](../views/graph_view.md)
* [DataframeView](../views/dataframe_view.md)

## API reference links
 * 🌊 [C++ API docs for `GraphNodes`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1GraphNodes.html)
 * 🐍 [Python API docs for `GraphNodes`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.GraphNodes)
 * 🦀 [Rust API docs for `GraphNodes`](https://docs.rs/rerun/latest/rerun/archetypes/struct.GraphNodes.html)

## Examples

### Simple undirected graph

snippet: archetypes/graph_undirected

<picture data-inline-viewer="snippets/archetypes/graph_undirected">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/graph_undirected/15f46bec77452a8c6220558e4403b99cac188e2e/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/graph_undirected/15f46bec77452a8c6220558e4403b99cac188e2e/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/graph_undirected/15f46bec77452a8c6220558e4403b99cac188e2e/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/graph_undirected/15f46bec77452a8c6220558e4403b99cac188e2e/1200w.png">
  <img src="https://static.rerun.io/graph_undirected/15f46bec77452a8c6220558e4403b99cac188e2e/full.png">
</picture>

### Simple directed graph

snippet: archetypes/graph_directed

<picture data-inline-viewer="snippets/archetypes/graph_directed">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/graph_directed/ca29a37b65e1e0b6482251dce401982a0bc568fa/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/graph_directed/ca29a37b65e1e0b6482251dce401982a0bc568fa/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/graph_directed/ca29a37b65e1e0b6482251dce401982a0bc568fa/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/graph_directed/ca29a37b65e1e0b6482251dce401982a0bc568fa/1200w.png">
  <img src="https://static.rerun.io/graph_directed/ca29a37b65e1e0b6482251dce401982a0bc568fa/full.png">
</picture>

