Function Repository Resource:

SubstitutionSystemCausalPlot

Source Notebook

Generate a plot illustrating causal features of substitution system evolution

Contributed by: Wolfram Physics Project Team

ResourceFunction["SubstitutionSystemCausalPlot"][data]

generates a plot showing the causal structure of a substitution system, using data generated by the resource function SubstitutionSystemCausalEvolution.

Details and Options

ResourceFunction["SubstitutionSystemCausalPlot"] takes the same options as Graphics, with the following additions:
"CausalCone"Falsewhether to show the causal cones
"CausalConeEdgeStyle"Automaticgraphics directives to specify the style for the causal cone edges
"CausalConeEventStyle"Automaticgraphics directives to specify the style for the causal cones
"CausalConeRoot"1root vertex for the causal cone
"CausalGraph"Falsewhether to show the causal graph
"CausalGraphStyle"Automaticgraphics directives to specify the style for the edges of the causal graph
"CellLabels"Falsewhether to show cell labels
"CellLabelStyles"<||>style specifications for cell labels
"ColorTable"Automaticcolors to use for the cells
"EventHeight"1height of a cell corresponding to an event
"EventLabels"Falsewhether to show labels of the events
"EventPolygonStyle"Automaticgraphics directives to specify the style for the event polygons
"NumberSize"10.font size of the number labels
"SpaceSurfaceStyle"Automaticgraphics directives to specify the style for the space surface
"VerticalGridLinesStyle"Whitegraphics directives to specify the style for the vertical grid lines

Examples

Basic Examples (3) 

Generate a causal history for a substitution system, using a localized pseudorandom generator to standardize the replacement choices in the specified random update scheme:

In[1]:=
evo = BlockRandom[SeedRandom[2635]; ResourceFunction[
   "SubstitutionSystemCausalEvolution"][{"AB" -> "BA"}, "ABABBABBAAABABAAAABAABBB", 20, {"Random", 4}]]
Out[1]=

Visualize the evolution's causal structure:

In[2]:=
ResourceFunction["SubstitutionSystemCausalPlot"][evo]
Out[2]=

Show the causal graph and label the events:

In[3]:=
ResourceFunction["SubstitutionSystemCausalPlot"][evo, "CausalGraph" -> True, "EventLabels" -> True]
Out[3]=

Scope (1) 

Visualize the causal structure for various updating schemes:

In[4]:=
Table[ResourceFunction["SubstitutionSystemCausalPlot"][
   ResourceFunction[
    "SubstitutionSystemCausalEvolution"][{"AB" -> "BA"}, "ABABBABBAAABABAAAABAABBB", 10, type], "CausalGraph" -> True, "EventLabels" -> True, PlotLabel -> type], {type, {"Forward", "Backward", "Sequential", "First"}}] // GraphicsRow
Out[4]=

Options (13) 

CausalCone (1) 

Display the causal cones for a causal structure:

In[5]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CausalCone" -> True]
Out[5]=

CausalConeEventStyle (1) 

Change the style for the causal cones:

In[6]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CausalCone" -> True, "CausalConeEventStyle" -> LightGreen]
Out[6]=

CausalConeRoot (1) 

Use a different root for the causal cones:

In[7]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CausalCone" -> True, "CausalConeRoot" -> 3]
Out[7]=

CausalGraph (1) 

Show the causal graph:

In[8]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CausalGraph" -> True]
Out[8]=

CausalGraphStyle (1) 

Change the style of the causal graph:

In[9]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CausalGraph" -> True, "CausalGraphStyle" -> Directive[Arrowheads[Small], ColorData[97, 1]]]
Out[9]=

CellLabels (1) 

Show the cell labels:

In[10]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CellLabels" -> True]
Out[10]=

CellLabelStyles (1) 

Use different styles for the cell labels:

In[11]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "CellLabels" -> True, "CellLabelStyles" -> <|"A" -> ColorData[61, 1], "B" -> ColorData[61, 3]|>]
Out[11]=

ColorTable (1) 

Use different colors for the cells:

In[12]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "ColorTable" -> ColorData[61, "ColorList"]]
Out[12]=

EventHeight (1) 

Show at different event heights:

In[13]:=
GraphicsRow[{ResourceFunction["SubstitutionSystemCausalPlot"][
   ResourceFunction[
    "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "EventHeight" -> 1], ResourceFunction["SubstitutionSystemCausalPlot"][
   ResourceFunction[
    "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "EventHeight" -> 1.5]}, ImageSize -> Large]
Out[13]=

EventLabels (1) 

Show labels for the events:

In[14]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "EventLabels" -> True]
Out[14]=

EventPolygonStyle (1) 

Use a different style for the events:

In[15]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "EventPolygonStyle" -> Orange]
Out[15]=

NumberSize (1) 

Show the event labels with a larger font size:

In[16]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "EventLabels" -> True, "NumberSize" -> 14.]
Out[16]=

VerticalGridLinesStyle (1) 

Use a different style for the vertical grid lines:

In[17]:=
ResourceFunction["SubstitutionSystemCausalPlot"][
 ResourceFunction[
  "SubstitutionSystemCausalEvolution"][{"AB" -> "BA", "AA" -> "BAB"}, "BBAAABAABBABBABA", 7], "VerticalGridLinesStyle" -> Pink]
Out[17]=

Version History

  • 6.0.1 – 02 April 2021
  • 6.0.0 – 10 April 2020
  • 5.0.0 – 27 March 2020
  • 4.0.0 – 23 March 2020
  • 3.0.0 – 20 March 2020
  • 2.0.0 – 11 March 2020
  • 1.0.0 – 09 March 2020

Related Resources

License Information