Histogram visualizes statistics collected by a number of Histogram Data objects. The X axis always is scaled to fit all histogram data ranges. The histograms are also scaled along the Y axis so that the highest bar of each histogram occupies the full height of the picture. The PDF bars, the CDF line and the mean location can be shown optionally.

Histogram
PDF (probability distribution function) is displayed as a number of vertical bars each corresponding to a particular interval with heights proportional to the density (or number) of data samples within the interval. The bars may be setup to look as a solid block or distinct bars.
CDF (cumulative distribution function) is displayed as a polyline on top of PDF, and the mean value – as a vertical line at the corresponding value axis position.
If percentiles are calculated and both low and high confidence measures are specified, the bars corresponding to the lower and higher confidence measures are highlighted with the given colors. The bars that contain the exact “values at risk” (values satisfying the equation CDF(value) = low confidence measure or CDF(value) = 100 – high confidence measure) are drawn in the corresponding intermediate colors.
To
draw a histogram
element
from
the Analysis
page of the Palette
view into the graphical editor (right to the place where you want to
locate this chart).Name – The name of the histogram.
Show name – If selected, the name of the histogram is displayed on a presentation diagram.
Ignore – If selected, the histogram is excluded from the model.
Public – If selected, the histogram is visible on a presentation diagram of the owner of this active object class.
Show PDF – If selected, PDF is shown on the histogram.
Show CDF – If selected, CDF is shown on the histogram.
Show mean – If selected, mean value is shown with a line.
Add histogram data – The button opens new property section, which allows to configure one more data item you want to visualize on this histogram:
Title – The title for this data item, which will be shown in the histogram legend.
Histogram – The name of the Histogram Data object, which will be displayed on this histogram.
PDF color – [Enabled if Show PDF is selected] Color, which will be used to draw PDF of this histogram data.
CDF color – [Enabled if Show CDF is selected] Color, which will be used to draw CDF of this histogram data.
Mean color – [Enabled if Show mean is selected] Color of line, which will visualize the mean value of this histogram data.
CDF & mean line width – [Enabled if Show CDF or Show mean is selected] Width of CDF and/or mean line.
Low % color – [Enabled if percentiles are collected for the histogram data] Color, which will be used to draw PDF to the left from low percentile.
High % color – [Enabled if percentiles are collected for the histogram data] Color, which will be used to draw PDF to the right from high percentile.
To remove a data item
from
the histogram, click the
button
Do not update data automatically - If selected, chart is not updated automatically with new data samples.
Update data automatically – [Visible if the histogram is on active object diagram] If selected, new data samples are added automatically with the specified Recurrence time (defined in model time units).
Auto update data after every run/iteration – [Visible if the histogram is on experiment diagram] If selected, new data samples are added after each model run/iteration.
X – The x-coordinate of the histogram's upper left corner.
Y – The y-coordinate of the histogram's upper left corner.
Width – The width of the histogram (in pixels).
Height – The height of the histogram (in pixels).
Border color – Color used to draw border of the histogram. Click inside the control and choose a color from the set of most used ones, or choose some custom color using the Colors dialog box.
Background color – Background color for the histogram. Click inside the control and choose a color from the set of most used ones, or choose some custom color using the Colors dialog box.
Persistent (enable programmatic control) – If selected, the histogram is represented as Java object, so you can access it from code by its name. Using API, you can change visual properties of the histogram and thus manage its appearance during model simulation.
Dynamic properties are constantly reevaluated at the model runtime and thus may be used to dynamically change the chart visibility, size, position, etc.
Dynamic properties override static values defined in the corresponding Advanced properties. In case you leave the field empty, the property retains the default static value throughout the whole simulation.
You can also define here reactions on removing and/or selecting some data item(s) displayed by this chart.
| Name | Type | Description |
| Replication | int | The replication factor of the histogram. Here you specify how many copies of the histogram will be created. If you leave this field empty, only one histogram will be created. |
| Visible | boolean | The visibility of the histogram. The histogram is visible when the specified expression evaluates to true, and not visible otherwise. |
| X | double | The x-coordinate of the upper left corner of the histogram. |
| Y | double | The y-coordinate of the upper left corner of the histogram. |
| Width | int | The width of the histogram (in pixels). |
| Height | int | The height of the histogram (in pixels). |
| On selection change | - | The code executed when the user selects some particular data item(s). This code is executed either when the user changes the selection by clicking on items in the chart legend, and when the selection is changed programmatically via the method selectItem(). Two variables are at your hand here: int[] selectedIndices - the indices of currently selected data items. boolean programmatically - defines, whether items were selected programmatically (true), or not (false). |
| On item removal | - | The code executed when the user removes some particular data item(s) from the chart. This code is executed either when the user removes items from the context menu of the chart legend, and when data items are removed programmatically via methods remove() and removeAll(). Two variables are at your hand here: int removedIndex - index of the just removed data item. boolean programmatically - defines, whether the item was removed programmatically (true), or not (false). |
Chart Area properties section defines visual properties of the chart area:
X Offset – The x-offset of the chart area relative to the whole area allocated for the chart and all its accompanying elements.
Y Offset – The y-offset of the chart area relative to the whole area allocated for the chart and all its accompanying elements.
Width – The width of the chart area (in pixels).
Height – The height of the chart area (in pixels).
Border color – Color used to draw the border of the chart area. Click inside the control and choose a color from the set of most used ones, or choose some custom color using the Colors dialog box.
Background color – Background color for the chart area. Click inside the control and choose a color from the set of most used ones, or choose some custom color using the Colors dialog box.
Legend – If selected, the chart legend is displayed. You can control the legend position relative to the chart using the Position group of buttons. The size of the area allocated for the legend can be defined using either Width or Height control (depends on the legend's Position). Text color can also be adjusted.
Relative width – The slider allows adjusting the thickness of the bars (100% - maximum, 50% - half, etc.)
Vertical axis labels – The control specifies the position of vertical axis labels relative to the chart (Left or Right). Choose None, if you do not want labels to be displayed.
Grid color – The control specifies the color of the chart grid. Choose No Fill, if you do not want grid to be displayed.
Labels text color – The control specifies the color of the chart labels.
If you do not need displaying some data object no more, you may easily remove it from the histogram any moment you like.
To
remove a data item from a histogram