Skip navigation
About Us Contact Us Software Support

Q: How can I get smoother curves on my plots?

A: The plot detail depends on the number and location of the times at which the solution is calculated. The solution times, in turn, are dependent upon the data points, and the number of calculation intervals specified. The first rule is that every time listed in the Data window creates a solution point.  The second rule is that the interval between solution points is never larger than the length of the experiment divided by the number of calculation intervals specified. If, for example, the experiment is 100 minutes long and the calculation intervals setting is 20, the application insures that the solution times are never more than 100 / 20 = 5 minutes apart.  If there are any gaps in the data larger than 5 minutes, the application will insert sufficient solution points to reduce the gap to 5 minutes or less.

The calculation intervals are set at the top of the Computational Settings window (to open it click Settings on the Compute menu). Notice that the value may be set anywhere from 1 to 200.  Using the maximum setting provides the greatest amount of detail but also requires the most time for computations. For smaller models, the additional time required to Solve or Fit may be insignificant, but for larger models it may be significant.

When one or more variables are plotted in SAAM II, the curve is drawn by connecting adjacent solution values via straight line segments. If the slope changes gradually or the points are very close together, the curve will appear quite smooth. If, however, the slope is changing rapidly and/or the points are farther apart, the curve may look jagged.  Figure 1 shows a plot where the calculations intervals setting is one, so the only solution points are at the data points. Notice that the curve is very rough since the data points are not very close together.

chart with plot where the calculations intervals setting is one
Figure 1

By changing the computational intervals setting to 100, the time between solution points is guaranteed never to exceed 400 / 100 = 4 minutes. After making the change and solving again, the resulting plot in Figure 2 shows the curve to be much smoother.

sample plot chart image
Figure 2

For a large model, the significant increase in the number of solution points could significantly increase the time required to Fit the model. There is another alternative. Since portions of the curve are fairly flat, it may not be necessary to calculate as many solution points in those areas. The area of particular interest in this example appears to be primarily from time 40 to 150. First, setting the number of calculation intervals back to 20 may be adequate before minute 40 and after minute 150 of the experiment. Since the data times also create solution points, opening the Data window and adding the data table for time only as shown below (notice that it contains only a column for time, t) will create solution points at each of those times.

Data
t
40.0
45.0
50.0
55.0
60.0
65.0
70.0
75.0
80.0
85.0
90.0
100.0
105.0
110.0
115.0
120.0
125.0
130.0
135.0
140.0
END

After closing the Data window and Solving the model again, the resulting curve is shown in Figure 3. Notice that the curve looks nearly as smooth as the one in Figure 2 that required many more solution points. This technique can be particularly useful where the finer detail is required over only a small portion of the curve.


Figure 3

n general, it’s best to leave the number of calculation intervals set to the default of 30 until after the model has been Fitted. If the plotted curve(s) are not satisfactory, then either the number of intervals can be increased for smaller models, or the last technique with time-only data points can be used if necessary to further enhance a small section of the model.

<< Back to Support Page