Efficient Black/White Colormap plot

I’m trying to efficiently create visualizations of a 2D Ising model (i.e., see Ising model - Wikipedia). Using Julia plots contour seems wasteful, and is definitely slow. Is there some simple black/white plot that could be used?

1 Like

heatmap?

heatmap(rand(0:1, 500,500), c=cgrad([:black, :white]))

image

2 Likes