# How to plot next to each other and in rows small matrices as images (greyscale)

**URL:** https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149
**Category:** Visualization
**Created:** [February 4, 2020, 7:23am UTC](https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149 "2020-02-04T07:23:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ujku\_KU](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ujku_ku/32/13159_2.png) [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)
#### Post date: [February 4, 2020, 7:23am UTC](https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149/1 "2020-02-04T07:23:56Z")

</div>

Hi guys, my question is: how to plot next to each other and in rows small matrices as images (greyscale)?

Thank you very much in advance for your support.

Cheers.

Ergnoor

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [February 4, 2020, 7:30am UTC](https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149/2 "2020-02-04T07:30:22Z")

</div>

If all images are the same size you can use `hcat`/`vcat`/`hvcat` to make one giant image. A more flexible approach, if you’re only interested in display, is to use `ImageView.imshow_gui`:  
[https://github.com/JuliaImages/ImageView.jl#simple-command-line-utilities](https://github.com/JuliaImages/ImageView.jl#simple-command-line-utilities)

---

<div class="post-metadata">

### Author: ![Ujku\_KU](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ujku_ku/32/13159_2.png) [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)
#### Post date: [February 4, 2020, 7:46am UTC](https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149/3 "2020-02-04T07:46:17Z")

</div>

@tim.holy Hi Tim and thank you very much for your help. I have one more question thou: Is it possible to control the size of the matrix/image when they are displayed? This is because my matrix/image are 28x28 pixels and should be very small and I would like to increase their size without changing them.

Thank you very much again for your support.

Cheers.

Ergnoor

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [February 4, 2020, 7:50am UTC](https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149/4 "2020-02-04T07:50:30Z")

</div>

Just supply a `canvassize`:

```julia
help?> imshow_gui
search: imshow_gui

  guidict = imshow_gui(canvassize, gridsize=(1,1); name="ImageView", aspect=:auto, slicedata=SliceData{false}())

  Create an image-viewer GUI. By default creates a single canvas, but with
  custom gridsize = (nx, ny) you can create a grid of canvases. canvassize =
  (szx, szy) describes the desired size of the (or each) canvas.

  Optionally provide a name for the window. aspect should be :auto or :none,
  with the former preserving the pixel aspect ratio as the window is resized.
  slicedata is an object created by roi that encodes the necessary information
  for creating player widgets for viewing multidimensional images.

```

If you resize the window the individual canveses will resize to match.

---

<div class="post-metadata">

### Author: ![Ujku\_KU](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ujku_ku/32/13159_2.png) [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)
#### Post date: [February 4, 2020, 8:21am UTC](https://discourse.julialang.org/t/how-to-plot-next-to-each-other-and-in-rows-small-matrices-as-images-greyscale/34149/5 "2020-02-04T08:21:49Z")

</div>

@tim.holy thank you very much Tim. Cheers. Ergnoor
