AmesimKnowledge

Types of graph view > Displaying Data

Part to whole composition

Sometimes, you need to know not just a total, but the components that comprise that total. While other charts (such as a standard bar chart) can be used to compare the values of the components, the following charts put part-to-whole decomposition at the forefront.

Stacked bar chart

The stacked bar chart (also called the stacked bar graph) extends the standard bar chart from looking at numeric values across one categorical variable to two. Each bar in a standard bar chart is divided into a number of sub-bars stacked end to end, each one corresponding to a level of the second categorical variable.

The main objective of a standard bar chart is to compare numeric values between levels of a categorical variable. One bar is plotted for each level of the categorical variable, each bar’s length indicating numeric value. A stacked bar chart also achieves this objective, but also targets a second goal.

You may want to move to a stacked bar chart when you are interested in the relative decomposition of each primary bar based on the levels of a second categorical variable. Each bar is now comprised of a number of sub-bars, each one corresponding to a level of a secondary categorical variable. The total length of each stacked bar is the same as before, but now you can see how the secondary groups contributed to that total.

Figure 33: Stacked bar chart

To create a stacked bar chart, the curves to which you apply the display need to be set as Y animated curves. Refer to the Y animated conversion and Y animated curve graph type sections for more information.

Usually the categories of the X-axis correspond to the variants from a result set selection. That is why the stacked bar chart is an interesting display when you are working with cross results. Please refer to the cross results section for more information.

You can access the options of each bar through the graph key. Double-click the graph key to open the window of the curve properties.

Figure 34: Curve properties of bar chart

The filling and the labels settings allow you to customize the display.

You can pick one filling color from a palette and choose a pattern with which the bar is filled.

You can select whether to display the values that are reached by the bars in the labels. Check the box value to add them on the graph. The label's location on the graph is defined by one of the four available positions (outside, inside top, inside center, and inside bottom).

Note

To group bars under the same level of the categorical variable of the X-axis, you can use the Plot Manager to set the title of the nodes for each curve as the name of the level.

Pie chart

A pie chart shows how a total amount is divided between levels of a categorical variable as a circle divided into radial slices. Each categorical value corresponds to a single slice of the circle, and the size of each slice (both in area and arc length) indicates what proportion of the whole each category level takes.

Pie charts have a fairly narrow use-case that is encapsulated particularly well by its definition. In order to use a pie chart, you must have some kind of whole amount that is divided into a number of distinct parts. Your primary objective in a pie chart should be to compare each group’s contribution to the whole, as opposed to comparing groups with each other. If the points above are not satisfied, a pie chart is not appropriate, and a different plot type should be used instead.

The values that comprise a whole and the categories that divide the whole generally come in two major varieties. First of all is when the ‘whole’ represents a total count. A second type of ‘whole’ is when the total is a sum over an actual data variable.

Figure 35: Pie chart

To create a stacked bar chart, the curves to which you apply the display need to be set as a Y animated curves. Refer to the Y animated conversion and Y animated curve graph type sections for more information.

Once the pie chart is created, you can access the options through the graph key. Double-click the graph key to open the window of the curve properties.

Figure 36: Curve properties of pie chart

The pie and the label settings allow you to customize the display.

You can pick a set of colors from a palette for the pie. The explode ratio allows you to tune the distance that separates the slices on the graph.

You can select whether to display the values for the labels, and the percentage over the total of each slices. The title of the variable that corresponds to a slice can be also displayed. Check the boxes to add them to the graph. The label's location on the graph is defined by one of the three available positions (automatic, inside, and outside).

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Plotting/xid1929759 · retrieved 2026-07-17