Skip to content

Commit

Permalink
fix: Alpha for colormaps in HexGrid (#2660)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sahil-Chhoker authored Feb 4, 2025
1 parent d5b19fd commit 80c65a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mesa/visualization/mpl_space_drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ def draw_property_layers(
rgba_colors[:, 3] = normalized_colors * alpha
else:
rgba_colors = cmap(norm(colors))
rgba_colors[..., 3] *= alpha

# Draw hexagons
collection = PolyCollection(hexagons, facecolors=rgba_colors, zorder=-1)
Expand Down

0 comments on commit 80c65a5

Please sign in to comment.