I have created a histogram of a variable in my model in NetLogo 5.0.5, but the histogram keeps showing a line rather than bars I want. I'm using the set-histogram-num-bars n in the pot set up areas, but nothing is changing. In the histogram example in the models library I also get a line rather than bars, even when I copy the settings from the previous histogram plot.
In my model the turtles have their own variable reliability, which ranges from 0 to 10 as a continuous function. I have 2000 turtles. In the plot areas I've added the following:
;;plot setup commands
set-plot-x range 0 10
set-plot-y-range 0 800
set-histogram-num-bars 10
;;plot pens
histogram [reliability] of turtles
Can anyone see where i might be going wrong?
I believe that you must set the plot pen mode to bar mode, which is mode 1.
set-plot-pen-mode 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With