Skip to content

Help with visualization (edgecolors, x-marker with background) #2602

Answered by Bamboo5838
Bamboo5838 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, I edited my comment.
While making a reproducible example I noticed that it ran with edgecolors when only using one agent.
So I tried giving the linewidths and edgecolors parameters to all agents and now it works.
If you remove the comment before

   #portrayal["linewidths"] = 3
   #portrayal["edgecolors"] = "b"

of Cell2 then it works, else you get the error I got.

Here is the complete example:

Dashboard

def arsonist_police_portrayal(agent):
    if agent is None:
        return
    portrayal = {
        "size": 50,
    }
    if isinstance(agent, Cell1):
        portrayal["color"] = "#ff0000"
        portrayal["marker"] = "s"
        portrayal["size"] = 300
        portrayal["linewidths"] =

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Bamboo5838
Comment options

@EwoutH
Comment options

@quaquel
Comment options

@Bamboo5838
Comment options

Answer selected by Bamboo5838
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants