playitbyr Getting Started Support--Help, Bugs, and Documentation GitHub Sonification Resources

shape_dotplot {playitbyr}R Documentation

Create a dotplot layer


Creates a dotplot layer using the sound of a snare drum.


  shape_dotplot(jitter = 0, ..., data = NULL,
    mapping = NULL)



The maximum size, in seconds, of how much to jitter time by when there are multiple notes at the same pitch and time (the sonic equivalent of overplotting). The default, 0, means no jitter occurs.


data, settings, and mappings to pass to sonlayer (see Details)


The data.frame to be sonified for this layer. If blank, the data from the parent sonify object is used.


A sonaes object.


The audio dotplot creates a sense of how the distribution is spread out in time. Users are only expected to really use the time parameter for mapping, but they may want to fiddle with the other aspects of the sound for aesthetic reasons.

When more than one value appears at a given time, this shape automatically adds noise to "jitter" the values so they can be heard distinctly.

These parameters are available for setting or mapping:


The starting time of the snare sound (in seconds).


The pitch of the note, in the Csound oct notation notation for pitches, where 8 is middle C and 1 represents an octave, to the corresponding frequency in Hertz. By default this is scaled to the nearest musical (chromatic) pitch. (See scale_pitch_continuous.)


The duration of the note (relative to the total time if relative = TRUE, in seconds otherwise).

To set a sound parameter to a value, you simply include it as an extra argument in shape_scatter; to map a parameter, you set the mapping for the layer or the sonify object using sonaes (see examples in shape_scatter).


A sonlayer object that can be added onto a sonify object.


Originally contributed by Sam Ferguson. Csound instrument created by Hans Mikelson.


S. Ferguson, W. Martens and D. Cabrera, “Statistical Sonification for Exploratory Data Analysis”, in The Sonification Handbook, ed. Hermann, Hunt, Neuhoff. Available:


x <- sonify(iris[1:10,], sonaes(time = Petal.Length)) + shape_dotplot(jitter = 0.3)
## Not run: print(x)