From 60b266ebdbb16309619d083c97e292573d963d94 Mon Sep 17 00:00:00 2001 From: milton Date: Mon, 10 Feb 2025 17:20:53 -0800 Subject: [PATCH 1/2] change deprecated name `as` --- docs/src/tutorial.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/tutorial.jl b/docs/src/tutorial.jl index 9a785788e..e40b79b19 100644 --- a/docs/src/tutorial.jl +++ b/docs/src/tutorial.jl @@ -600,7 +600,7 @@ groupmarker(a) = a.group == 1 ? :circle : :rect # We pass those functions to [`abmplot`](@ref) -figure, _ = abmplot(schelling; agent_color = groupcolor, agent_marker = groupmarker, as = 10) +figure, _ = abmplot(schelling; agent_color = groupcolor, agent_marker = groupmarker, agent_size = 10) figure # returning the figure displays it # The function [`abmvideo`](@ref) can be used to save an animation of the ABM into a video. From 62a1a408175e732f0941a9c6c5e7749ef0f094b9 Mon Sep 17 00:00:00 2001 From: milton Date: Wed, 12 Feb 2025 07:19:53 -0800 Subject: [PATCH 2/2] update toml and other `as` --- Project.toml | 2 +- examples/agents_visualizations.jl | 2 +- src/visualizations.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index f4aa82963..801b46277 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Agents" uuid = "46ada45e-f475-11e8-01d0-f70cc89e6671" authors = ["George Datseris", "Tim DuBois", "Aayush Sabharwal", "Ali Vahdati", "Adriano Meligrana"] -version = "6.2.4" +version = "6.2.5" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" diff --git a/examples/agents_visualizations.jl b/examples/agents_visualizations.jl index cfd45767c..7af68d94f 100644 --- a/examples/agents_visualizations.jl +++ b/examples/agents_visualizations.jl @@ -239,7 +239,7 @@ for i in 1:100; step!(abmobs, 1); end fig # ## GraphSpace models -# While the `ac, as, am` keyword arguments generally relate to *agent* colors, markersizes, +# While the `agent_color, agent_size, agent_marker` keyword arguments generally relate to *agent* colors, markersizes, # and markers, they are handled a bit differently in the case of [`GraphSpace models`](https://juliadynamics.github.io/Agents.jl/stable/api/#Agents.GraphSpace). # Here, we collect those plot attributes for each node of the underlying graph which can # contain multiple agents. diff --git a/src/visualizations.jl b/src/visualizations.jl index 6b42bc828..a4882b501 100644 --- a/src/visualizations.jl +++ b/src/visualizations.jl @@ -30,7 +30,7 @@ See also [`abmvideo`](@ref) and [`abmexploration`](@ref). ``` Notice that for 2D models, `agent_marker` can be/return a `Makie.Polygon` instance, which plots each agent as an arbitrary polygon. It is assumed that the origin (0, 0) is the agent's position when - creating the polygon. In this case, the keyword `as` is meaningless, as each polygon has + creating the polygon. In this case, the keyword `agent_size` is meaningless, as each polygon has its own size. Use the functions `scale, rotate_polygon` to transform this polygon. 3D models currently do not support having different markers. As a result, `agent_marker` cannot be