Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Decorate an ArrayPlot with additional characters
ResourceFunction["CharacterArrayPlot"][array] generates an ArrayPlot of array and overlays values as textual symbols. |
ColorRules | how to assign colors to array values |
CharacterRules | how to assign characters to array values |
CharacterStyleRules | how to assign styles to array values |
Mesh | a boolean value for adding a border to cells |
MeshStyle | how to style borders when Mesh is True |
Plot a numerical 2×2 array with colors and numbers:
In[1]:= | ![]() |
Out[1]= | ![]() |
Adjust GrayLevel values and font sizes:
In[2]:= | ![]() |
Out[2]= | ![]() |
Exchange numbers for letters:
In[3]:= | ![]() |
Out[3]= | ![]() |
Add colors:
In[4]:= | ![]() |
Out[4]= | ![]() |
Plot a position in a game of tic-tac-toe, player X to win:
In[5]:= | ![]() |
Out[5]= | ![]() |
Make an even larger plot of randomly-sampled letters:
In[6]:= | ![]() |
Out[6]= | ![]() |
CharacterArrayPlot is designed to work well with FromCharacterCode:
In[7]:= | ![]() |
Out[7]= | ![]() |
Or if you'd rather play a game of Xiangqi (象棋):
In[8]:= | ![]() |
Out[8]= | ![]() |
CharacterArrayPlot is not designed automatically scale text:
In[9]:= | ![]() |
Out[9]= | ![]() |
Using more than one character per cell can cause overflow:
In[10]:= | ![]() |
Out[10]= | ![]() |
Plot the initial condition of the "Moving Day" sliding block puzzle:
In[11]:= | ![]() |
Out[11]= | ![]() |
Plot possible moves as a branching Graph:
In[12]:= | ![]() |
Out[12]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License