Skip to content

Commit e05956c

Browse files
committed
Allowing colormapping to integers in AgentPortrayalStyle
1 parent 47eff74 commit e05956c

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

mesa/visualization/backends/matplotlib_backend.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ def collect_agent_data(self, space, agent_portrayal, default_size=None):
142142
else:
143143
aps = portray_input
144144
# Set defaults if not provided
145-
if aps.edgecolors is None:
146-
aps.edgecolors = aps.color
147145
if aps.x is None and aps.y is None:
148146
aps.x, aps.y = self._get_agent_pos(agent, space)
149147

mesa/visualization/components/portrayal_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class AgentPortrayalStyle:
4646

4747
x: float | None = None
4848
y: float | None = None
49-
color: str | tuple | None = "tab:blue"
49+
color: str | tuple | int | float | None = "tab:blue"
5050
marker: str | None = "o"
5151
size: int | float | None = 50
5252
zorder: int | None = 1

0 commit comments

Comments
 (0)