Function Repository Resource:

DottedArrayPlot

Source Notebook

Plot an array of values, with dots at specified positions

Contributed by: Stephen Wolfram

ResourceFunction["DottedArrayPlot"][{{a1, a2,},{i1, i2,}}]

plots the values an, with dots at position in.

ResourceFunction["DottedArrayPlot"][{{{a11, a12,},{a21,},},{{i11, i21,},{i21,},}}]

plots the values anm, with dots at position inm.

Details

Used in A New Kind of Science, e.g. on page 1068.
ResourceFunction["DottedArrayPlot"] accepts the same options as Graphics, with the following additions:
ColorFunctionAutomatichow each cell should be colored
ColorFunctionScalingTruewhether to scale the argument to ColorFunction
MeshTruewhether to draw a mesh
MeshStyleAutomaticthe style to use for a mesh

Examples

Basic Examples (1) 

Plot a sequence of bits with various positions indicated:

In[1]:=
ResourceFunction[
 "DottedArrayPlot"][{{1, 1, 0, 1, 0, 1, 1, 1}, {2, 4, 5}}]
Out[1]=

Scope (2) 

A 2D array:

In[2]:=
ResourceFunction[
 "DottedArrayPlot"][{{{1, 0, 0, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 0, 0, 1, 1}, {1, 0, 0, 1, 1, 0, 0, 1}}, {{1, 4, 7}, {1, 2, 5}, {2, 6}}}]
Out[2]=

Use Graphics options:

In[3]:=
ResourceFunction[
 "DottedArrayPlot"][{{{1, 0, 0, 1, 1, 1, 1, 0}, {0, 1, 1, 1, 0, 0, 1, 1}, {1, 0, 0, 1, 1, 0, 0, 1}}, {{1, 4, 7}, {1, 2, 5}, {2, 6}}}, Frame -> True, FrameTicks -> None]
Out[3]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.1.0 – 13 September 2021
  • 1.0.0 – 13 December 2018

License Information