Reputation: 65
In plotting a certain variable for each turtle, each turtle needs to be represented by a discrete color. As written, the discrete color changes from turtle to turtle at each time step. How do I make the color assignment to a turtle permanent?
ask turtles [
create-temporary-plot-pen (word who)
set-plot-pen-color one-of base-colors
plotxy ticks farm-size
]
Upvotes: 0
Views: 419
Reputation: 17678
If you want the colour to be maintained, you will need to store it. The easiest way is probably to have a variable for the turtles that holds its pen colour and assign that colour once only (during setup or whenever the turtle is created)
Upvotes: 1