# How to convert a matrix to an RGB image using Images.jl?

**URL:** <https://discourse.julialang.org/t/how-to-convert-a-matrix-to-an-rgb-image-using-images-jl/7265>\
**Category:** General Usage\
**Tags:** images\
**Created:** [November 23, 2017, 11:10am UTC](https://discourse.julialang.org/t/how-to-convert-a-matrix-to-an-rgb-image-using-images-jl/7265 "2017-11-23T11:10:49Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [November 23, 2017, 6:40pm UTC](https://discourse.julialang.org/t/how-to-convert-a-matrix-to-an-rgb-image-using-images-jl/7265/8 "2017-11-23T18:40:39Z")

</div>

@robblackwell consider using Plots.jl if your goal is only plotting a 2D matrix with a custom colormap.

```julia
using Plots

heatmap(img, cmap=:inferno)

```

---

_[View the full topic](https://discourse.julialang.org/t/how-to-convert-a-matrix-to-an-rgb-image-using-images-jl/7265)._
