# Agents.jl: Introductory Tutorial - Error

**URL:** <https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658>\
**Category:** Modelling & Simulations\
**Tags:** question, plotting\
**Created:** [May 7, 2022, 11:11am UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658 "2022-05-07T11:11:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Floyd\_Gartner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/floyd_gartner/32/36017_2.png) [@Floyd\_Gartner](https://discourse.julialang.org/u/Floyd_Gartner)\
**Post date:** [May 7, 2022, 11:11am UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/1 "2022-05-07T11:11:11Z")

</div>

Hello everybody,

I’m trying to work through the Youtube Tutorial for Agents.jl ([https://www.youtube.com/watch?v=fgwAfAa4kt0](https://www.youtube.com/watch?v=fgwAfAa4kt0)) but I got stuck.  
When I tried plotting the model it worked fine but when I tried to change the color and the marker I got following Error:

“ERROR: MethodError: no method matching abm\_plot(::AgentBasedModel{GridSpace{2, true}, Schelling, typeof(Agents.Schedulers.randomly), Dict{Symbol, Int64}, Random.TaskLocalRNG}; ac=groupcolor, am=groupmarker)  
Closest candidates are:  
abm\_plot(::Any…) at /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/base/deprecated.jl:45 got unsupported keyword arguments “ac”, “am”  
Stacktrace:  
[1] top-level scope  
@ ~/Documents/TU/Abschlussarbeit/Julia/Agents Tutorial/Tutorial.jl:87”

I don’t know why it won’t work, I already looked at my lines 45 and 87 but I’ve got the same code as the tutorial.

Screenshot:

 ![Bildschirmfoto 2022-05-07 um 13.02.28](https://global.discourse-cdn.com/julialang/original/3X/f/4/f4fbe880944b986ec3103f9f04c9c84e7288457c.jpeg)

Any suggestions what I did wrong? And why does my code color for some symbols look different than the one in the Video, do I need a package that I missed or is it just a color theme?

Greetings,  
Floyd

---

<div class="post-metadata">

**Author:** ![Floyd\_Gartner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/floyd_gartner/32/36017_2.png) [@Floyd\_Gartner](https://discourse.julialang.org/u/Floyd_Gartner)\
**Post date:** [May 7, 2022, 11:11am UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/2 "2022-05-07T11:11:43Z")

</div>

Screenshot 2:

 ![Bildschirmfoto 2022-05-07 um 13.01.06](https://global.discourse-cdn.com/julialang/original/3X/5/7/574eed68b66d38bbcf0d405e137a7a6f955da783.jpeg)

---

<div class="post-metadata">

**Author:** ![Floyd\_Gartner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/floyd_gartner/32/36017_2.png) [@Floyd\_Gartner](https://discourse.julialang.org/u/Floyd_Gartner)\
**Post date:** [May 7, 2022, 11:45am UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/3 "2022-05-07T11:45:45Z")

</div>

Here is the complete code of the tutorial: [Gist of Agents.jl introductory workshop · GitHub](https://gist.github.com/Datseris/e7e15d3559f8dc69d07bba051d904ebf#file-schelling-jl)

If I just copy and paste it into my Visual Studio I get the same Error for the abm\_plot, keywords ac, am and as are unsupported…  
(Line 67)

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [May 7, 2022, 12:27pm UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/4 "2022-05-07T12:27:37Z")

</div>

I wonder whether the tutorial is compatible with the version of Agents.jl that you are using. This is a potential hazard of posting code without including an environment with version control.

If you use the most recent version of Agents.jl, does the following example work for you?

[https://juliadynamics.github.io/Agents.jl/stable/examples/schelling/](https://juliadynamics.github.io/Agents.jl/stable/examples/schelling/)

---

<div class="post-metadata">

**Author:** ![Christopher\_Fisher](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christopher_fisher/32/26132_2.png) [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Post date:** [May 7, 2022, 12:43pm UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/5 "2022-05-07T12:43:38Z")

</div>

I think the problem is that `abm_plot` is deprecated in Agents.jl 5.2.0. You can use the following instead:

```julia
fig, _ = abmplot(model; ac = groupcolor, am = groupmarker, as = 10)
display(fig)

```

---

<div class="post-metadata">

**Author:** ![Floyd\_Gartner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/floyd_gartner/32/36017_2.png) [@Floyd\_Gartner](https://discourse.julialang.org/u/Floyd_Gartner)\
**Post date:** [May 7, 2022, 1:59pm UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/6 "2022-05-07T13:59:40Z")

</div>

Thanks! That worked!

Seems like the code was not compatible with the new version of Agents.jl.

---

<div class="post-metadata">

**Author:** ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Post date:** [May 7, 2022, 3:19pm UTC](https://discourse.julialang.org/t/agents-jl-introductory-tutorial-error/80658/7 "2022-05-07T15:19:36Z")

</div>

I’ve updated the gist to latest version and also added a comment on the youtube video
