Creating plots with NetLogoWeb

33 views
Skip to first unread message

Eva Ravnikar

unread,
Jul 9, 2024, 1:23:58 PM (13 days ago) Jul 9
to netlogo-users
Dear netLogo users

I'm new to netLogo and I'm trying to understand and recreate some "Wolf Sheep" models that can be found in the NetLogoWeb version. Admittedly, I haven't studied all the information available online, but I have spent some time searching for my specific question.
As I want to use NetLogoWeb with my secondary school students, I am sticking to the NetLogoWeb interface to avoid the need for a full NetLogo installation. Also, I'm building the model "from scratch" and would like to add:

A) "go" and "setup" buttons
B) some plots for the number of sheep and wolves

Is it at all possible to add buttons and use "plot" commands in the web version?
I haven't found a way to add buttons and when I try to add plot commands I keep getting an "error while running SET-CURRENT-PLOT" error and I can't find any explanation of how to solve it.

My procedure is as follows:
1) I defined wolf and sheep breeds and let sheep die in some simulation steps.
2) I use the command interface by running setup (once) and go (several times). I would like to do this by clicking a button, but there seems to be no way to do this in the web version.
3) I want to plot the number of sheep using commands such as..
set-current-plot "Sheep"
set-current-plot-pen "Sheep"
plot number of sheep
.. but I always get an "error while running SET-CURRENT-PLOT", no matter where I call the plot-related procedures.

Many thanks for any little hint.

Regards, Eva


Jacob Kelter

unread,
Jul 16, 2024, 4:20:49 PM (6 days ago) Jul 16
to netlogo-users
Hi Eva,

Would you be willing to ask this question in the new NetLogo forum and I'll answer it there? You'll have to create an account and then click the "+ New Topic" button in the Q&A category. If not, no problem. Just let me know and I'll answer here. 

Best,
Jacob

Reply all
Reply to author
Forward
0 new messages