Credits Overview Plotting Styles Commands Terminals

jitter

Syntax:

      set jitter {overlap <yposition>} {spread <factor>} {wrap <limit>}
                 {swarm|square|vertical}

Examples:

      set jitter                    # jitter points within 1 character width
      set jitter overlap 1.5        # jitter points within 1.5 character width
      set jitter over 1.5 spread 0.5  # same but half the displacement on x

When one or both coordinates of a data set are restricted to discrete values then many points may lie exactly on top of each other. Jittering introduces an offset to the coordinates of these superimposed points that spreads them into a cluster. The threshold value for treating the points as being overlapped may be specified in character widths or any of the usual coordinate options. See coordinates. Jitter affects 2D plot styles with points, with impulses and with boxplot. It also affects 3D plotting of voxel grids.

The default jittering operation displaces points only along x. This produces a distinctive pattern sometimes called a "bee swarm plot". The optional keyword square adjusts the y coordinate of displaced points in addition to their x coordinate so that the points lie in distinct layers separated by at least the overlap distance.

To jitter along y (only) rather than along x, use keyword vertical.

The maximum displacement (in character units) can be limited using the wrap keyword.

Note that both the overlap criterion and the magnitude of jitter default to one character unit. Thus the plot appearance will change with the terminal font size, canvas size, or zoom factor. To avoid this you can specify the overlap criterion in the y axis coordinate system (the first keyword) and adjust the point size and spread multiplier as appropriate. See coordinates, pointsize.

Caveat: jitter is incompatible with "pointsize variable".

set jitter is also useful in 3D plots of voxel data. Because voxel grids are regular lattices of evenly spaced points, many view angles cause points to overlap and/or generate Moiré patterns. These artifacts can be removed by displacing the symbol drawn at each grid point by a random amount.