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

  • Diagrams

Tech Notes

  • Introduction to Diagrammatic Computation

Symbols

  • ColumnDiagram
  • DiagramComposition
  • DiagramDraw
  • DiagramDual
  • DiagramFlip
  • DiagramGraphics
  • DiagramGrid
  • Diagram
  • DiagramNetwork
  • DiagramProduct
  • DiagramReverse
  • DiagramSum
  • IdentityDiagram
  • PermutationDiagram
  • PortDual
  • Port
  • PortProduct
  • RowDiagram
  • ToDiagram
Wolfram`DiagrammaticComputation`
Diagram
​
Diagram[expr]
create a diagram with an expression.
​
​
Diagram[expr,output]
create a diagram with
output
ports.
​
​
Diagram[expr,output,input]
create a diagram with
output
and
input
ports.
​
​
Diagram[…,opts]
provide auxiliary options to a diagram.
​
Details and Options

Examples  
(11)
Basic Examples  
(4)
Create a diagram with two output and three input ports:
In[1]:=
Diagram
["A",{a,b},{c,d,e}]
Out[1]=
​
Horizontally compose diagrams using ⊗ (
CircleTimes
):
In[1]:=
Diagram

Diagram
["A",a,b]⊗
Diagram
["B",c,d]
Out[1]=
​
Vertically compose diagrams using ⊙ (
CircleDot
):
In[1]:=
Diagram

Diagram
["A",b,a]⊙
Diagram
["B",c,b]
Out[1]=
​
​
Inverse port arrows with * (
SuperStar
):
In[1]:=
Diagram

*
Diagram
["A",{a,b,c},{d,e}]

Out[1]=
Use any expression for diagram content and its ports:
In[2]:=
Diagram
[Unevaluated[1+2],3]
Out[2]=
​
Make a symbolic array out of a diagram:
In[1]:=
Diagram

Diagram
["B",c,d]/*
Diagram
["C",d,e]
Out[1]=
In[2]:=
diagram
=
Diagram

Diagram
["A",a,b]⊗
Diagram
["C",d,e]⊙
Diagram
["B",c,d]
Out[2]=
In[3]:=
array=diagram["Tensor"]
Out[3]=
T:Cycles[{{2,3}}]

⥎
A

⥎
C
.
⥎
B

In[4]:=
TensorDimensions[array]
Out[4]=
{b,e,a,c}
Options  
(7)

RelatedGuides
▪
Diagrams
""

© 2025 Wolfram. All rights reserved.

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