-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
Description
Currently, agent_portrayal
should return a dict. Valid fields are color
, marker
, size
, and zorder
. In #2430 and in a comment on #2389, it has been suggested to shift to an AgentPortrayaStyle
class instead. The benefit of this is that is much easier to write your own agent_portrayal function. It also ensures that only valid fields are used. It might make it easier to write agent_portrayal functions that are indifferent about the plotting backend (i.e., altair or matplotlib). Last, it becomes trivial for all draw_x
functions in mesa.visualization.compoments.matplotlib
to be modifies so agent_portrayal becomes an optional keyword argument.
A while back @wang-boyu also made a remark about this in #1441.