Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow "Filled" Markers in Altair Backend (FIXME) #2956

@falloficarus22

Description

@falloficarus22

What's the problem this feature will solve?
Currently, users cannot control whether markers in the Altair visualization backend are filled or just outlines. The filled status is hardcoded to True in mesa/visualization/backends/altair_backend.py, limiting customization options for agent portrayals. A FIXME comment in the code specifically identifies this limitation:

# FIXME: Make filled user-controllable
filled_value = True

Proposed Solution
I propose updating the AgentPortrayalStyle component to include a filled attribute (defaulting to True to preserve existing behavior). The AltairBackend should then be updated to respect this attribute, allowing users to define agents with unfilled/outline-only markers by setting filled=False in their portrayal.

Additional context
I have already implemented this locally and am preparing a Pull Request to resolve the FIXME.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions