Skip to content

Commit

Permalink
Fix color mapping for Colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Milk committed Jul 3, 2024
1 parent 229d7c5 commit 515e961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/marsilea/plotter/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def __init__(
self.palette = palette

self.render_cmap = ListedColormap(render_colors)
self.vmax = len(render_colors)
self.vmax = len(render_colors) - 1
# Encode data into cmap range
encode_data = encode_numeric(data, encoder)
self.set_data(_mask_data(encode_data, mask=mask))
Expand Down

0 comments on commit 515e961

Please sign in to comment.