Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

DiagrammaticComputation

Guides

  • DiagramConversion
  • DiagramDrawing
  • DiagramGrid
  • DiagramRewriting
  • Diagrams
  • DiagramSurgery
  • FeynmanDiagrams
  • Ports

Tech Notes

  • Diagram Examples
  • Introduction to Diagrammatic Computation
  • Rewriting Diagrams

Symbols

  • AnnihilationRule
  • CapDiagram
  • ColumnDiagram
  • CommutationRule
  • CopyDiagram
  • CupDiagram
  • DiagramArrange
  • DiagramAssignPorts
  • DiagramCases
  • DiagramComposition
  • DiagramCopySplit
  • DiagramDecompose
  • DiagramDelete
  • DiagramDraw
  • DiagramDual
  • DiagramExpressionReplace
  • DiagramExtract
  • DiagramFlip
  • DiagramFunction
  • DiagramGraphics
  • DiagramGraphSimplify
  • DiagramGridHeight
  • DiagramGrid
  • DiagramGridTree
  • DiagramGridWidthHeight
  • DiagramGridWidth
  • DiagramHypergraph
  • DiagramHypergraphRule
  • DiagramInsert
  • DiagramMapAt
  • DiagramMap
  • DiagramMatchPorts
  • Diagram
  • DiagramNestReplace
  • DiagramNetwork
  • DiagramPattern
  • DiagramPermute
  • DiagramPosition
  • DiagramPositions
  • DiagramProduct
  • DiagramQ
  • DiagramReplaceList
  • DiagramReplace
  • DiagramReplacePart
  • DiagramReverse
  • DiagramRightComposition
  • DiagramRule
  • DiagramsFreePorts
  • DiagramsGraph
  • DiagramsNetGraph
  • DiagramSplit
  • DiagramsPortGraph
  • DiagramSubdiagrams
  • DiagramSum
  • DiagramTensor
  • DuplicateAnnihilationRule
  • DuplicateEraserRule
  • EmptyDiagram
  • EmptyDiagramQ
  • EmptyPortQ
  • EraserAnnihilationRule
  • EraserDiagram
  • EraserRule
  • FeynArtsTopologyGraphics
  • FeynmanDiagram
  • GridInputPorts
  • GridOutputPorts
  • IdentityDiagram
  • MergeDiagram
  • PermutationDiagram
  • PortDual
  • PortMinus
  • Port
  • PortNeutral
  • PortPower
  • PortProduct
  • PortQ
  • PortSum
  • PropagationRule
  • RemoveDiagramRule
  • RowDiagram
  • SimplifyDiagram
  • SingletonDiagram
  • SpiderDiagram
  • TagPort
  • TensorDiagram
  • ToDiagram
  • ToDiagramNetwork
  • TopologyGraphics
  • TopologyGraph
  • TopologyGraphs
  • UntagPort
  • WigglyArcFunction
  • ZeroDiagram
  • ZeroPortQ
Wolfram`DiagrammaticComputation`
ToDiagram
​
ToDiagram
[obj]
converts the object
obj
into a
Diagram
.
​
Details and Options
Examples  
(1)
Properties & Relations  
(1)
ToDiagram
is the general-purpose entry point;
TensorDiagram
is the specialised conversion for tensor expressions.
SeeAlso
Diagram
▪
TensorDiagram
▪
DiagramNetwork
RelatedGuides
▪
DiagramConversion ▪ Diagrams
Convert a
Graph
:
In[1]:=
ToDiagram
[Graph[{13,23,34,35}]]
Out[1]=
Convert a hypergraph:
In[2]:=
ToDiagram
[{{1},{1,2},{2,3},{1,2,3}}]
Part::partw: Part 1 of {} does not exist.
Part::partw: Part 1 of {} does not exist.
Part::partw: Part 1 of {} does not exist.
General::stop: Further output of Part::partw
will be suppressed during this calculation.
Out[2]=
Convert a tree:
In[3]:=
ToDiagram
[Tree[1,{Tree[2,None],Tree[3,{Tree[4,None]}]}]]
Out[3]=
Convert a lambda expression:
In[4]:=
ToDiagram
[λ.[λ.[1[2][2[1]]]]]
Out[4]=
Convert a
SystemModel
import:
In[5]:=
ToDiagram
[Import["ExampleData/ExampleModel.mo","MO"]]
Out[5]=
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com