Histogram

This tutorial shows how to configure and customize a Histogram layer into ZENPLOT® for your future visualizations.


Do you want to try ZENPLOT® out? You can Download the trial version at any time!

1. Dataset

In this tutorial, we use the iris dataset. The observations correspond to 150 Iris flowers, described by 5 variables:

  • Sepal Length, quantitative variable
  • Sepal Width, quantitative variable
  • Petal Length, quantitative variable
  • Petal Width, quantitative variable
  • Species, qualitative variable: Setosa, Versicolor ou Virginica

Sources:

Fisher M. (1936). The Use of Multiple Measurements in Taxonomic Problems. Annals of Eugenics, 7, pp 179 -188.

2. Configure a Histogram layer into ZENPLOT®

To create a Histogram layer, click on Add a layer and select the Histogram layer.

Tutorial Histogram step 1 Tutorial Histogram step 2

The entered quantitative variable is discretized. The height of each bar corresponds to the count of the number of observations belonging to each interval thus created.

You must enter:

  • The dataset you want to use (here, iris)
  • The reference variable to be discretized, X Coordinates: a quantitative variable

Tutorial Histogram step 3

3. Customize a Histogram layer in ZENPLOT®

Once the Histogram layer is created, different options are available in the options bar.

You can choose two ways to customize the characteristic of an element:

By imposing a uniform style on all elements

In this case, all the bars of the layer will have the same style applied for that characteristic (same border or same color).

Tutorial Histogram step 4

By binding the characteristic to a variable in the dataset

In this case, all the bars on the layer will have a different style for that characteristic depending on the value they take for the linked variable.

For the Histogram layer, only qualitative variables can be linked to a characteristic. You must therefore choose a style for each category of the variable.

Tutorial Histogram step 5

3.1 Layer setting

You can reconfigure your layer at any time (change datasets, variables, etc.)

Tutorial Histogram step 6

3.2 Border options

3 border options are available:

  • Thickness
  • Type
  • Color

Tutorial Histogram step 7

3.3 Bars width

This characteristic cannot be linked to any variable.

You can choose two ways to customize the width of the bars:

By informing the bin width: the width of the discretization intervals

Tutorial Histogram step 8

By providing the number of bins: the number of discretization intervals

Tutorial Histogram step 9