NestGraphTagged
A version of NestGraph in which edges corresponding to different outputs are tagged differently
ResourceFunction["NestGraphTagged"][f,expr,n] gives the tagged graph obtained by starting with expr and applying f successively n times. |
Details and Options
"StateLabeling" | False | whether to render states as boxes |
"RuleStyling" | Automatic | list of styles for edges/rules |
"FormattingFunction" | Automatic | how to format state |
"PostProcessGraph" | Identity | post process graph |
"TagHead" | Rule | custom head to associate tags with output values |
Examples
Basic Examples (5) 
Make a nested graph with edge coloring:
In[1]:= |
Out[1]= |
Use pure function:
In[2]:= |
Out[2]= |
Use a list of initial expressions:
In[3]:= |
Out[4]= |
Add a legend to explain colors:
In[5]:= |
Out[5]= |
Label the vertex states in a nested graph:
In[6]:= |
Out[6]= |
Scope (4) 
Edge colorings can be overridden:
In[7]:= |
Out[7]= |
Add labels to edges:
In[8]:= |
Out[8]= |
Add tooltips to edges:
In[9]:= |
Out[9]= |
An alternate type of edge labeling:
In[10]:= |
Out[10]= |
Make custom edge tags by constructing rule values:
In[11]:= |
Out[11]= |
Options (5) 
StateLabeling (1) 
Turn on special vertex shapes:
In[12]:= |
Out[12]= |
FormattingFunction (1) 
Change the formatting for vertex 31:
In[13]:= |
Out[13]= |
RuleStyling (1) 
Use custom styles for output values:
In[14]:= |
Out[14]= |
PostProcessGraph (1) 
If the output is graphics, it useful to apply some custom function to the graph itself:
In[15]:= |
Out[15]= |
TagHead (1) 
Instead of Rule, use custom head to specify edge tags:
In[16]:= |
Out[16]= |
Neat Examples (2) 
Vertices can be number pairs:
In[17]:= |
Out[17]= |
For a remainder graph, to find 2143 (mod 7), start at 0 and follow (2143) to get remainder 1:
In[18]:= |
Out[18]= |