Function Repository Resource:

DotPlot

Source Notebook

Create a dot plot for a set of real-valued univariate data

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["DotPlot"][data]

plots the integer data on a number line, stacking repeated values.

Details

ResourceFunction["DotPlot"] has the same options as NumberLinePlot.

Examples

Basic Examples (1) 

Get a dot plot for a set of univariate data:

In[1]:=
ResourceFunction["DotPlot"][{1, 2, 3, 1, 2, 3, 3, 4, 5}]
Out[1]=

Scope (1) 

Get a dot plot for a random dataset:

In[2]:=
data = RandomInteger[{-5, 5}, 20]
ResourceFunction["DotPlot"][data]
Out[2]=
Out[3]=

Options (1) 

DotPlot has the same options as NumberLinePlot:

In[4]:=
ResourceFunction[
 "DotPlot"][{21, 21, 21, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 27, 27, 27}, PlotStyle -> Pink]
Out[4]=

Possible Issues (1) 

DotPlot only supports real-valued datasets:

In[5]:=
ResourceFunction["DotPlot"][{I, 2, 3}]
Out[5]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 2.0.0 – 23 March 2023
  • 1.0.0 – 19 December 2022

Author Notes

To view the full source code for DotPlot, evaluate the following:

License Information