Documentation Vision Library+ Documentation

Histogram+

Histogram+ shows how often a value falls into each range over a period. Overlay a normal curve, check capability against specification limits, or rank the states of a digital value as a Pareto chart.

Overview

Histogram of a tank level with a normal curve, the mean and the median

Watch the demo

See Histogram+ in a practical PI Vision workflow.

When to use it

Use Histogram+ when you need to:

  • See the spread and the most common range of a process value.
  • Compare how closely a distribution follows a normal curve, with the mean, median, standard deviation lines and quantiles.
  • Judge whether a process fits its specification limits (Cp, Cpk, Pp, Ppk).
  • Find the few states of a digital or text value that account for most events.
  • Compare the distributions of several data sources on the same bars.

Choose Control Chart+ when you need to know whether the process is stable over time, and Combo Chart+ to follow the values themselves over time.

Before you begin

  • Prepare numeric PI Points or AF attributes with recorded values in the display time range. A digital state, boolean or text source gives a count per state instead of bars.
  • Choose a time range that holds enough values for the bars to mean something. A few dozen values give sparse bars.
  • For capability against AF limits, the attribute needs the limit traits HiHi, LoLo and Target (or other limit traits you choose). Otherwise enter the limits by hand.

Add and set up the symbol

  1. Select Histogram+ in the PI Vision symbol gallery.
  2. Drag a numeric PI Point or attribute onto the display.
  3. Set the display time range, for example the last 8 hours.
  4. Right-click the symbol and select Configure Histogram.
  5. Open the Axis X section and set Number of Bars to 20.
  6. Close the pane. The symbol shows one bar per range with its count, and the mean and standard deviation under the title.
Histogram with 20 bars and the count of each bar

Common tasks

Show the distribution against a normal curve

Use this to see how far a process value departs from a normal distribution.

  1. Right-click the symbol and select Configure Histogram.
  2. Open Trace Options and expand Statistics.
  3. Set Bell Curve (1) to ON.
  4. Set Mean (2) to ON.
  5. Set Standard Deviation (3) to 2.
Statistics group with Bell Curve, Mean and Standard Deviation marked

The chart draws a normal curve with the same mean and standard deviation as your data, a line at the mean, and lines at 1 and 2 standard deviations on each side. The closer the bars follow the curve, the closer the values are to normal. Here the bars are flat on top, so the tank level is spread more evenly than a normal curve.

Histogram with a bell curve, the mean line and standard deviation lines

To mark other points, switch Median on, or select + under Quantiles and enter a fraction between 0 and 1. A quantile of 0.95 draws a line where 95 % of the values lie below it.

Choose the number of bars

Use this when the bars are too coarse to show the shape, or so fine that they look ragged.

  1. Right-click the symbol and select Configure Histogram.
  2. Open Axis X.
  3. In Binning rule (1), choose Manual to set the bars yourself, or a rule that calculates them from the data.
  4. With Manual, enter the count in Number of Bars (2), from 1 to 100.
Axis X group with Binning rule and Number of Bars marked
RuleUse it when
ManualYou want the same bars every time, for example 10 bars over 0 to 100.
SturgesThe sample is moderate and roughly normal.
ScottThe data is roughly normal and the sample is large.
Freedman-DiaconisThe data has outliers, which affect this rule least.

With a rule, Number of Bars is hidden. On about 5,800 values over 8 hours, the rules drew roughly 15 (Sturges), 29 (Scott) and 37 (Freedman-Diaconis) bars.

Histogram with the bars calculated by the Scott rule

To fix the range the bars cover, set Scale Range to Custom in the same section.

Check capability against specification limits

Use this to find out whether a numeric process value stays inside its specification. It works per data source, for numeric data in Histogram mode.

  1. Right-click the symbol and select Configure Histogram.
  2. Open Trace Options, select the data source, and expand Statistics.
  3. Set Specification limits (1) to Fixed values.
  4. Enter the upper limit (2), the target (3) and the lower limit (4), in the unit the chart shows.
  5. Keep Capability readout (5) and Specification lines (6) ON.
Specification limits with fixed values and the two switches marked

Dashed lines mark the lower limit, the target and the upper limit. A line above the plot gives Cpk and Ppk, each colored by its verdict: 1.33 or more is capable (green), 1.00 to 1.33 marginal (amber), below 1.00 not capable (red).

Histogram with specification lines and the capability readout

Hover the readout to see every index. Cpk compares the limits with the short-term variation between neighboring values, Ppk with the overall spread. In the example Cpk is 6.99 and Ppk 0.60: the level is steady from one moment to the next but wanders over the whole range, so it does not stay inside the limits.

Capability readout tooltip listing Cp, Cpk, Pp, Ppk, Cpm, sigma level and DPMO

Two warnings can follow the readout: not normal and possibly two populations. The indices assume a normal distribution, so treat a flagged result with care. For an AF attribute, choose AF limit traits in step 3 to read the limits from its HiHi, LoLo and Target traits. While capability is on, the mean and standard deviation on the chart count every value once, so they can differ from the figures without capability.

Rank the states of a digital value as a Pareto chart

Use this to find the few states, such as stop reasons or machine modes, that account for most events. The data source must be a digital state, boolean or text value, and the only data source on the symbol.

  1. Right-click the symbol and select Configure Histogram.
  2. Under General, set Chart Mode (1) to Pareto.
  3. Enter a number in Top N (0 = all) (2) to keep only the largest categories and merge the rest into Other. Enter 0 to show every category.
  4. Keep 80 % line (3) ON to draw the 80 % reference line.
General group with Pareto selected, Top N and the 80 % line marked

The bars run from the most frequent state to the least frequent, and a line shows the cumulative percentage on the right axis. The states up to the one where the line reaches 80 % are drawn solid, the rest dimmed. Other is always last.

Pareto chart of controller modes with an Other bar and the 80 % line

To rank by how long each state lasted instead of how often it occurred, open Data Retrieval and set Basis to Time Weighted. This suits downtime reasons. Basis is available with the Recorded mode.

Compare data sources on the same scale

Use this to compare how several data sources are distributed, even when they have different numbers of values.

  1. Right-click the symbol and select Configure Histogram.
  2. Under General, set Stacked (1) to OFF, so each data source gets its own bar in every range.
  3. Open the Axis Y section, expand Value Scales, and set Y value (1) to Percent.
  4. Open Trace Options, select each data source, and set its Color and Label.
General group with Stacked off
Value Scales group with Y value set to Percent

Each data source shows its share of its own values (the unit in the title belongs to the first data source), so the bars of one data source add up to 100 % whatever its number of values. The legend names the data sources.

Three data sources drawn side by side as percentages of their own values

With Stacked ON, the data sources pile up in one bar, which shows the combined count. Choose Density in step 3 to compare the bars with a normal curve.

Use the symbol

Histogram with numbered callouts
What it shows
(1)The title with the data source name and unit, and the mean and standard deviation below it.
(2)A mean or standard deviation line with its label.
(3)A bar with its count. Its width is the range of values it covers.
(4)The normal curve.
(5)The tooltip of the bar under the pointer: its range and count.
(6)The toolbar with Fullscreen and Download.
  • Hover a bar to see its range and count. In a Pareto chart the tooltip adds the share and the cumulative percentage.
  • Fullscreen opens the chart in a large dialog. Download saves a picture (PNG, SVG, PDF) or the binned data (CSV, JSON, XLSX).
  • If the toolbar is not shown, set Toolbar > Show to ON.
  • Time range: the bars follow the PI Vision display time range. Histogram+ also supports the Time Bar for its own range.
  • No data: the chart shows empty axes. Check the time range and the data source.
  • The symbol only displays data. It does not write to the PI System or change other symbols.

Configure the symbol

Right-click the symbol and select Configure Histogram. Sections appear in this order.

Trend Options

SettingWhat it does
GeneralChart Mode selects Histogram, Pie (each bin as a slice) or Pareto (see Rank the states of a digital value as a Pareto chart). Stacked piles several data sources in one bar. Top N and 80 % line apply to Pareto.
TitleShows or hides the title. Mode uses the data source names or your own text. Units adds the unit. Statistics adds the mean and standard deviation.
StyleTheme and the display colors, Font Size, bar Opacity, and Stroke width.
GridGrid lines, bands and the plot border. Not shown in Pie mode.
Data LabelsShows the count on each bar and sets its position. In Pie mode it also offers the name and percentage.
TooltipTurns the hover panel on or off.
LegendPosition and alignment of the legend. Shown with more than one data source, or in Pie mode.
ToolbarShow turns the toolbar on or off. Reveal shows it on hover or always.

Axis X

SettingWhat it does
Binning rule, Number of BarsChoose how many bars a numeric histogram draws. Used in Choose the number of bars.
Show All StatesKeeps states that never occurred on the axis. Available for digital state sources.
Show, Position, Invert Scale, TitleShow or hide the axis, put it at the bottom or top, reverse it, and give it a title.
Scale RangeAuto fits the bars to the data. Database uses the point's Zero and Span. Custom fixes Minimum and Maximum; the Auto box next to each keeps that side automatic.
TicksAuto or Custom tick labels.

Axis Y

SettingWhat it does
Y valueCount shows the number of values per bar (time spent, in Time Weighted mode). Percent shows each bar as a share of its data source, adding up to 100 %. Density divides that share by the bar width, so bars compare with a normal curve. Not shown in Pie mode. Density is not offered for digital states.
Label Position, Scale TypeSet where the axis labels sit, and choose one shared count axis, one axis per data source, or custom axes.
Show, Position, Invert Scale, Title, TicksWork as on Axis X.
Scale RangeAuto fits the scale to the counts. Custom fixes Minimum and Maximum, in the unit of Y value.

Multi-state section

Available for numeric data. Sets how multi-state limits added to the symbol are drawn.

SettingWhat it does
PropertyDraws each state as a Range, as Lines, or as Bars.
Reference ValueFor Bars: measures from the Begin, Median or End of the state.
LabelsShows the state names. Not available for Bars.

Data Retrieval

SettingWhat it does
ModeRecorded uses every stored value. Interpolated uses values at regular intervals.
Data LimitCaps the number of recorded values requested. Available in Recorded mode.
BasisEvent Weighted counts values. Time Weighted weighs each bin by how long the value was held. For digital state sources it is offered in Pareto mode only.
Start- and EndtimesDisplay time range follows the PI Vision time bar. The other choices give the symbol its own range.

Trace Options

Select a data source in the list first. The settings below apply to that data source.

SettingWhat it does
Data source listLists, reorders and removes the data sources.
Label, ColorName and bar color of the data source.
Bell Curve, Mean, MedianDraw the normal curve, the mean line and the median line. Each has a Color; the lines have a Label switch. Available for numeric data. Used in Show the distribution against a normal curve.
Standard DeviationDraws lines at 1, 2 or 3 standard deviations from the mean, or none.
Quantiles+ adds a line at a fraction between 0 and 1, with its own color and a Label switch.
Specification limitsNone (default), AF limit traits or Fixed values. Sets the limits for capability. Used in Check capability against specification limits.
Capability readoutShows Cpk and Ppk above the plot. The hover panel adds Cp, Pp, Cpm (needs a target), the sigma level, the defects per million (DPMO, observed and predicted), and the shape of the distribution.
Specification linesDraws the limits and the target as labeled dashed lines.

Capability needs at least 10 values. Cp and Pp need both limits. An index that cannot be calculated shows its reason. A limit trait that changes during the time range withholds the capability, because no single limit applies.

Time Bar, Export Data and Numbers

SettingWhat it does
Time BarSettings of the shared Time Bar.
Export DataChoose csv or xlsx under File Format and select Download. One row per bar or state, with a count column and a Percent column per data source. A Pareto chart adds Cumulative Percent. The context menu Export Data and the toolbar Download write the same table. Hidden when the administrator disables exports.
NumbersNumber format of the values. Available for numeric data.

Troubleshooting and limitations

SymptomCauseWhat to do
The chart is empty.The time range holds no values, or the data source is not numeric or a digital state.Check the time range, the Mode, and the data source.
The bars look sparse or ragged.Too many bars for the number of values.Reduce Number of Bars or choose Sturges under Binning rule.
Pareto is not offered under Chart Mode.The symbol has a numeric data source, or more than one data source.Use exactly one digital state, boolean or text data source.
The capability readout is missing.Specification limits is None, or the chart is in Pie or Pareto mode.Set the limits, and use Histogram mode.
Cp and Cpk show too few intervals.Fewer than 10 interval averages hold values.Use a longer time range.
The readout shows not normal or possibly two populations.The shape of the distribution breaks the assumption behind the indices.Treat Cpk and Ppk with care and check the shape.
No capability with AF limit traits.A limit trait is missing, or changes during the time range.The pane shows the values in force. Add the trait, or enter Fixed values.
The toolbar is missing.Toolbar > Show is OFF.Set Show to ON.

Limitation: Neither axis offers a logarithmic scale.

Limitation: In Recorded mode the median, the quantiles and Freedman-Diaconis are estimated from 100 fine bins. In Interpolated mode they are exact.

Limitation: Capability counts every value once, also when Basis is Time Weighted.

Limitation: Histogram+ has no zoom. The toolbar offers Fullscreen and Download only.