How to add points to 2 differents series on the same graph? #3692
-
Hi, I wish to make a line graph with 2 differents series:
So far so good. Now I want to add additional points to each series as a calculation progress similar to what we can see on this example of Agents.jl: https://juliadynamics.github.io/Agents.jl/stable/examples/agents_visualizations/. I tried something like that to initialize the graph:
And to update the graph:
However neither the graph nor the What am I doing wrong? What's the correct way to do it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
That append only accesses the observable's value and doesn't do anything to it. You can If you were assigning to the variable as Also, have you seen the |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot! Using What are |
Beta Was this translation helpful? Give feedback.
That append only accesses the observable's value and doesn't do anything to it. You can
notify(y1)
afterwards to let the observable know it's been updated.If you were assigning to the variable as
y1[] = ...
, then there would be no need tonotify
.Also, have you seen the
timeseries
recipe?