Questions about how to implement special use cases of plots

Just a few things I wanted to do with plots lately but don’t know how to implement. Any help would be appreciated!

  • How do you to get graphs to update on setup? (Currently, I just have the setup function
    perform a tick to cause the graphs to populate themselves, but then my ticks start at 1 which is not preferable)
  • If I have a turtle-owned variable, how can I make a plot that draws the value of the variable at each tick for each turtle - eg. Having a pen monitoring individual agent’s variable can be programmatically created on setup?
  • Is there a way to override the fact that (from the histogram netlogo documentation) “For histogramming purposes the plot’s X range is not considered to include the maximum X value. Values equal to the maximum X will fall outside of the histogram’s range.”? I want to override this as it causes turtle-owned float values of 1.0 to not be graphed in a histogram ranging from 0 to 1. (my current fix is setting the range to 1.1)

Thanks!

  1. There is an update-plots primitive. See if that works for your use case.
  2. I’m not sure what you are asking exactly for this one, but you might be able to do what you want with create-temporary-plot-pen. Are you really trying to plot something individually for all of your turtles? If you describe this more specifically, I might be able to help more.
  3. I’ve never noticed that and it is quite strange to me. Your work around seems reasonable.
  1. That worked, thanks!
  2. Yes, I am trying to plot something individually for all of my turtles. Basically, I think it would be interesting to see the trajectory of a variable for each turtle over time, so at each tick, I want a point on a line to be plotted corresponding to the variable’s value at that tick. I tried messing around with create-temporary-plot-pen and am having trouble since theres no way to define the pen’s update command.