Libraries‎ > ‎Library‎ > ‎Graphing‎ > ‎

Log log histogram

BehaviourComposer: ignore everything before this.

Begin micro-behaviour:

Begin description:

Plot the logarithm of frequency of data versus the logarithm of data values.

End description

Log log histogram

Begin NetLogo code:

substitute-text-area-for data-expression power-law-list 10000 2 100
substitute-text-area-for interval-expression 1
substitute-text-area-for plot-name "Log log plot"
substitute-text-area-for command-before-plotting plot-pen-reset
set-current-plot plot-name
command-before-plotting ; remove this if multiple plots are desired
log-log-histogram (data-expression)
                  interval-expression

End NetLogo code

Variants

Edit the first box to specify which plot area this should use. By default before plotting any plots are erased. Remove the contents of the second text area to change this. Any expression that produces a list of numbers can be used in the third text area. The fourth text area specifies the width of the intervals that are used.

How this works

This relies upon the log-log-histogram command.

Related micro-behaviours

This requires a plotting area to draw on. Use Create empty auto plot orCreate empty plot.

History

Log log histogram was first implemented by Ken Kahn on 15 March 2012.

BehaviourComposer: ignore everything after this.

Comments