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`
Diagram
​
Diagram
[data]
represents a diagram carrying the data
data
, with no input or output ports.
​
​
Diagram
[data,{
o
1
,
o
2
,…}]
specifies the output ports
o
1
,
o
2
,â-¦
.
​
​
Diagram
[data,{
i
1
,…},{
o
1
,…}]
specifies the input ports
i
1
,â-¦
and output ports
o
1
,â-¦
.
​
Details and Options
Examples  
(3)
Scope  
(1)
The data argument can be any expression:
In[1]:=
Diagram
[Unevaluated[1+2],3]
Out[1]=
A diagram can be converted to a symbolic tensor:
In[2]:=
diagram=
Diagram

Diagram
["A",a,b]⊗
Diagram
["C",d,e]⊙
Diagram
["B",c,d];​​
DiagramTensor
[diagram]
Out[2]=
TransposeArrayDot
⥎
A
,

a
,1ArrayDot
⥎
C
,
⥎
B
,1,Cycles[{{2,3}}]
Options  
(1)

Properties & Relations  
(1)

SeeAlso
DiagramQ
▪
ToDiagram
▪
Port
▪
DiagramProduct
▪
DiagramComposition
▪
DiagramSum
▪
DiagramNetwork
▪
DiagramDual
▪
DiagramFlip
▪
DiagramReverse
▪
DiagramGraphics
▪
DiagramGrid
RelatedGuides
▪
Diagrams
Create a diagram with two input and three output ports:
In[1]:=
Diagram
["A",{a,b},{c,d,e}]
Out[1]=
Horizontally compose diagrams using
CircleTimes
:
In[2]:=
Diagram

Diagram
["A",a,b]⊗
Diagram
["B",c,d]
Out[2]=
Vertically compose diagrams using
CircleDot
:
In[3]:=
Diagram

Diagram
["A",b,a]⊙
Diagram
["B",c,b]
Out[3]=
Invert port arrows with
SuperStar
:
In[4]:=
Diagram
SuperStar
Diagram
["A",{a,b,c},{d,e}]
Out[4]=
""

© 2026 Wolfram. All rights reserved.

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