Simulation with AnyLogic/Agent-Based Modeling/Step 5. Adding charts

< Simulation with AnyLogic‎ | Agent-Based Modeling

Step 5. Adding Charts

You can study the dynamics of the investigated process using AnyLogic charts. We will create a chart to show how populations of product adopters and potential adopters change with time.
We have created data sets that can be displayed on charts. Now it's time to add charts.

Step 1. Creating a new model1.gif Draw a time plot displaying adopter and potential adopter population dynamics

  1. Drag the Time Plot Step 5. Adding charts1.gif element from the Analysis page of the Palette view into the graphical editor.
  2. Resize it to look as in the figure below.
    Step 5. Adding charts2.png
  3. Go to the General page of the Properties view.
  4. Set Time Window: 8.
  5. Specify data items to be displayed on the time plot.
  6. Сlick the Add Data Set button and define settings for the data item in the property section above.
  7. Type people.potentialAdopters() in the Expression field. Here we tell the chart to display the result returned by potentialAdopters statistics function of the replicated object people.
    You can use code assistant while typing code in this edit box.
  8. Set Potential adopters as the Title of the data set. It will be displayed in the legend for this data item.
  9. Choose the first option from the Point Style drop-down list to turn off indicating data set values with a marker.
  10. In the same way, add another data item on the chart, displaying people.adopters(). Set Adopters as the Title of this data item and modify its visual properties in the same way.
    Step 5. Adding charts3.png