Skip to content

Commit

Permalink
Remove JupyterViz Altair marker overlap for huge grid size (projectme…
Browse files Browse the repository at this point in the history
  • Loading branch information
rht authored Feb 29, 2024
1 parent f6a585e commit 05b9700
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mesa/experimental/components/altair.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,10 @@ def portray(g):
.properties(width=280, height=280)
# .configure_view(strokeOpacity=0) # hide grid/chart lines
)
# This is the default value for the marker size, which auto-scales
# according to the grid area.
if not has_size:
length = min(space.width, space.height)
chart = chart.mark_point(size=30000 / length**2, filled=True)

return chart

0 comments on commit 05b9700

Please sign in to comment.