Function Repository Resource:

TagSystemRulePlot

Source Notebook

Generate the rule icon for a tag system

Contributed by: Stephen Wolfram

ResourceFunction["TagSystemRulePlot"][rules]

generates a plot representing rules for a tag system.

Details and Options

The three dots in the representation for each rule stand for the rest of the elements in the sequence.

Examples

Basic Examples (2) 

Generate rule icons from A New Kind of Science, page 93:

In[1]:=
rules1 = {{{0} -> {1, 0}, {1} -> {1, 0}}, {{0} -> {0, 1}, {1} -> {1, 0}}, {{0} -> {0, 1}, {1} -> {0}}};
In[2]:=
ResourceFunction["TagSystemRulePlot"] /@ rules1
Out[2]=

Visualize rules from A New Kind of Science, page 94:

In[3]:=
rules2 = {{{0, 0} -> {1, 1}, {1, 0} -> {}, {0, 1} -> {1, 0}, {1, 1} -> {0, 0, 0}}, {{0, 0} -> {}, {1, 0} -> {1}, {0, 1} -> {1, 1}, {1, 1} -> {1, 1, 0}}, {{0, 0} -> {0}, {1, 0} -> {1, 0, 1}, {0, 1} -> {0, 0, 0}, {1, 1} -> {0, 1, 1}}, {{0, 0} -> {0, 1}, {1, 0} -> {1, 0, 0}, {0, 1} -> {0}, {1, 1} -> {1, 0, 0}}, {{0, 0} -> {1, 0}, {1, 0} -> {1}, {0, 1} -> {0, 1, 0}, {1, 1} -> {0, 0, 1}}, {{0, 0} -> {0}, {1, 0} -> {0, 1, 0, 1}, {0, 1} -> {0, 0}, {1, 1} -> {1, 1, 1, 0}}};
In[4]:=
ResourceFunction["TagSystemRulePlot"] /@ rules2
Out[4]=

Options (2) 

ColorRules (1) 

Specify color rules for explicit values or patterns:

In[5]:=
ResourceFunction["TagSystemRulePlot"][{{0} -> {1, 0}, {1} -> {0, 1}}, ColorRules -> {0 -> Blue, 1 -> Red}]
Out[5]=

FrameStyle (1) 

Make the frame blue:

In[6]:=
ResourceFunction["TagSystemRulePlot"][{{0} -> {1, 0}, {1} -> {1, 0}}, FrameStyle -> Directive[Thick, Blue]]
Out[6]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.1.0 – 19 August 2024
  • 1.0.1 – 15 July 2022
  • 1.0.0 – 25 February 2019

Source Metadata

Related Resources

License Information