Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NetLogo histogram showing up as a line instead of bars

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?

like image 289
Simon Bush Avatar asked Feb 13 '23 17:02

Simon Bush


1 Answers

I believe that you must set the plot pen mode to bar mode, which is mode 1.

set-plot-pen-mode 1
like image 102
Charles Avatar answered Apr 06 '23 01:04

Charles