1

I want to give the names "Meat Market" and "Substitutes Market" to the two blocks bottom left and top right. I tried to use ask market-patches [ set plabel "Meat Market"] ask market-patches1 [ set plabel "Substitutes Market"]but the results was this: enter image description here

market-patches and market-patches1 are both global variables. When it executes the code it probably writes "Meat Market" and "Substitutes Market" for each patch but what I want is one big "Meat Market" and "Substitutes Market" for each blue square respectively. How can I avoid this?

TripleG
  • 21
  • 3

1 Answers1

0

You'll have to ask just one of the patches to do this. I'm assuming you are assigning the two blue blocks by asking patches with corresponding x and y coordinates to set their pcolor to blue? I'd ask the two patches at the center of each of these areas to set their plabel, and no others.

Alternatively, look at the model El Farol in the models library. It writes letters across patches in large font, so you could use the code from that.

Arthur Hjorth
  • 889
  • 4
  • 10