Libraries‎ > ‎Library‎ > ‎Interface gadgets‎ > ‎

Create monitor

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Create a monitor to display the current value of an attribute, parameter, or computation.

End description

Create monitor

Begin NetLogo code:

substitute-text-area-for monitor-label parameter      
substitute-text-area-for upper-left-corner-x 5    
substitute-text-area-for upper-left-corner-y 250 
substitute-text-area-for lower-right-corner-x 80   
substitute-text-area-for lower-right-corner-y 300 
substitute-text-area-for monitor-value random-number-between 0 1
substitute-text-area-for monitor-number-of-decimals 4 
substitute-text-area-for monitor-font-size 11 
create-monitor 
  "monitor-label" ; label of the monitor
  "upper-left-corner-x" "upper-left-corner-y" ; upper left corner (from the upper left corner of the applet) 
  "lower-right-corner-x" "lower-right-corner-y" ; lower right corner
  (monitor-value) ; value being monitored
  "monitor-number-of-decimals" ; number of decimals
  "monitor-font-size" ; font size

End NetLogo code

Variants

All the text area parameters can be changed. 

How this works

This creates a NetLogo monitor that continually displays the value. In this example a random number between 0 and 1.

Related micro-behaviours

History

Create monitor was implemented by Ken Kahn.

BehaviourComposer: ignore everything after this.

Comments