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



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.



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.


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




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:


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