TIBCO Spotfire® Business Author and Consumer User's Guide

Creating a histogram

In a histogram, you can show the distribution of numerical data. The entire range of the numerical values is divided into equal intervals on the Category axis, and for each interval, it is indicated on the Value axis how many individual data values that fall within it.

About this task


Histogram example.
The histogram above is based on a bar chart. It shows how sales figures are distributed between the lowest and the highest amount. Usually there are gaps between each of the bars in a bar chart. In a histogram though, the bars are placed next to each other to better visualize the distribution of the numerical values along the range. Each interval of the range, also known as a bin, makes a category that is represented by a bar, and the height of a bar shows the number of data values in that particular interval.
The number of bins can be increased or decreased by dragging the slider on the axis. The following histogram shows the same data as the previous histograms, but the number of bins has been increased.
Histogram with many bins
The steps below describe how to create a histogram based on a bar chart. A histogram based on a line chart is created in a similar way.

Procedure

  1. On the authoring bar, click Visualization types to open the flyout.
  2. Drag the Bar chart visualization type to the wanted position on the analysis page.
    A suggestion of a bar chart is presented.
  3. On the Category axis, select the numerical data column for which the distribution of the values is of interest.
    If the amount of data is big, the range of values on the axis is automatically divided into bins. If no automatic binning is made, do as follows:
    1. Click the column selector on the axis to open its popover.
      Column selector popover
    2. In the upper-right corner of the popover, click Settings button in column selector popover and then select Auto-bin column.
      The range of values on the axis is divided into bins. A slider where you can change the number of bins supplements the column selector.
  4. Increase or decrease the number of bins by dragging the slider.
    The bars adjust to show how many values that fall within the specified bins.

Example

The table lists body weights for 150 men and women. The weights range from 50.0 to 110.0 kg.
Data table used in histogram example
The histogram below displays the distribution of values across 6 bins. The first bar shows the number of people that weighs between 50 and 60 kg, the second bar between 60 and 70 kg, and so on.
Histogram showing the distribution of weights across 6 bins.
If you color by gender, you can examine male and female distribution differences as well.
Histogram colored by gender.