# Efficient Black/White Colormap plot

**URL:** <https://discourse.julialang.org/t/efficient-black-white-colormap-plot/44157>\
**Category:** Visualization\
**Created:** [August 3, 2020, 12:10am UTC](https://discourse.julialang.org/t/efficient-black-white-colormap-plot/44157 "2020-08-03T00:10:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gideonsimpson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gideonsimpson/32/1928_2.png) [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Post date:** [August 3, 2020, 12:10am UTC](https://discourse.julialang.org/t/efficient-black-white-colormap-plot/44157/1 "2020-08-03T00:10:01Z")

</div>

I’m trying to efficiently create visualizations of a 2D Ising model (i.e., see [Ising model - Wikipedia](https://en.wikipedia.org/wiki/Ising_model#/media/File:Ising_quench_b10.gif)). Using Julia plots contour seems wasteful, and is definitely slow. Is there some simple black/white plot that could be used?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [August 3, 2020, 2:29am UTC](https://discourse.julialang.org/t/efficient-black-white-colormap-plot/44157/2 "2020-08-03T02:29:03Z")

</div>

[heatmap](https://docs.juliaplots.org/latest/generated/plotly/#plotly-ref28-1)?

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

```

![image](https://global.discourse-cdn.com/julialang/original/3X/d/d/dd819734f1a2a545d3630555a3550ffcc11c1e5d.png)
