Skip to content

Commit 4f2cd03

Browse files
committed
Fix a regression creating a matrix visualization with a color scale and a default colormap.
1 parent e17b65f commit 4f2cd03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toyplot/canvas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def matrix(
760760
colormap = toyplot.require.instance(data[1], toyplot.color.Map)
761761
else:
762762
matrix = toyplot.require.scalar_matrix(data)
763-
colormap = toyplot.color.brewer.map("BlueRed")
763+
colormap = toyplot.color.brewer.map("BlueRed", domain_min=matrix.min(), domain_max=matrix.max())
764764

765765
colors = colormap.colors(matrix)
766766

0 commit comments

Comments
 (0)