# Best way to view an image or 2-D array in Atom/Juno?

**URL:** <https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523>\
**Category:** Visualization\
**Tags:** question\
**Created:** [October 18, 2017, 2:15pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523 "2017-10-18T14:15:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidssmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidssmith/32/615_2.png) [@davidssmith](https://discourse.julialang.org/u/davidssmith)\
**Post date:** [October 18, 2017, 2:15pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523/1 "2017-10-18T14:15:03Z")

</div>

What is the most seamless way to view images in the Juno IDE with Atom?

Typically my “images” are 2-D float arrays, not RGB.

I usually use `imshow` from PyPlot, but that doesn’t seem to work inline with Atom.

Thanks!

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [October 18, 2017, 2:16pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523/2 "2017-10-18T14:16:55Z")

</div>

Try Plots.jl with the GR backend, that seemed to work quite well the last time I tried. Images.jl also has Juno integration IIRC.

---

<div class="post-metadata">

**Author:** ![davidssmith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidssmith/32/615_2.png) [@davidssmith](https://discourse.julialang.org/u/davidssmith)\
**Post date:** [October 18, 2017, 2:17pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523/3 "2017-10-18T14:17:33Z")

</div>

What is the command from Plots.jl that you use?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [October 18, 2017, 2:20pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523/4 "2017-10-18T14:20:12Z")

</div>

`heatmap`:

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/1/1/119c34b20a5a9fc49c8e4922f85e8ba0f4c87deb.png)

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [October 18, 2017, 5:47pm UTC](https://discourse.julialang.org/t/best-way-to-view-an-image-or-2-d-array-in-atom-juno/6523/5 "2017-10-18T17:47:18Z")

</div>

It’s very easy to convert a float array to an Images.jl image, since “images” in Images.jl are just regular matrices of Color types. So if you have a matrix `A` of floats in the range 0-1, you can turn that into a grayscale image with:

```julia
Gray.(A)

```

Here’s an example in Jupyter. I don’t use Juno myself, but I believe it should work as well:

![Screenshot from 2017-10-18 13-46-59](https://global.discourse-cdn.com/julialang/original/3X/5/c/5cf1bcfb0da563034b3d393185ed9e2e2538f2ea.png)
