### 7 Displaying a Histogram

7.1 Use
7.2 Notes
7.3 Alternatives
 file: histogram.net example data files: field.general, particle.general

This network plots a histogram of the data values in a data set (strictly speaking in a DX field; see Section 17). It also displays the median, minimum and maximum values in the data. It will work on $n$-dimensional gridded data and $n$-dimensional particle data. It can be used for preliminary investigation of a dataset about which you have no prior knowledge, in order to determine the range and distribution of values which it contains.

#### 7.1 Use

The network is shown in Figure 10.

• To specify the data cube to be read double-click on the ‘Import’ module and follow the instructions in Section 4.1.
• By default the histogram will contain 100 bins (unless the data are of data type byte, in which case it will contain 256 bins). To specify the number of bins double-click on the ‘Histogram’ module and set the input ‘bins’ to the value required.
• By default the network generates a histogram spanning the entire range of values in the data set. You may need to control the range of values histogramed (for example, to prevent a few rogue values from dominating the $x$ range of the plot). The simplest way to control the $x$ range is to set the ‘min’ and ‘max’ inputs of the ‘Histogram’ module.

#### 7.2 Notes

The histogram is generated by module ‘Histogram’ and turned into a graph by module ‘Plot’. The minimum and maximum values in the data are calculated by ‘Statistics’. ‘Format’ and ‘Caption’ assemble the median, minimum and maximum into a text string and ‘Collect’ combines the string with the graph.

#### 7.3 Alternatives

If your data are in Starlink NDF format then an alternative way to generate a histogram is to use command HIST in Figaro (see SUN/86[7]). This option will work for $n$-dimensional gridded data.