title: How to create an arbitrary number of subplots in Julia Plots
body: <p>I want to make a set of subplots from a multidimensional array using Breloff's Julia <a href="https://github.com/tbreloff/Plots.jl/blob/master/src/plot.jl" rel="nofollow noreferrer">Plots</a>.  This plot function takes a varargs input and makes them into subplots, but I can't seem to feed my array in properly and am probably overlooking something simple.  For example with an array <code>a</code>:</p>
  
  <pre><code>a = randn(5,5,8)
  a = a.-mean(a)
  a = a./maximum(extrema(a))
  </code></pre>
  
  <p>If I want to plot some of the 5x5 slices as heatmaps, I can do:</p>
  
  <pre><code>plot(heatmap(a[:,:,1], aspect_ratio=:equal, clims=(-1,1), title=string(1)), 
  heatmap(a[:,:,2], aspect_ratio=:equal, clims=(-1,1), title=string(2)),
  heatmap(a[:,:,3], aspect_ratio=:equal, clims=(-1,1), title=string(3)))
  </code></pre>
  
  <p>which produces:</p>
  
  <p><a href="https://i.stack.imgur.com/MHUaq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MHUaq.png" alt="array of 3 heatmaps"></a></p>
  
  <p>but if I want to do all eight (or a variable number which is my goal), I can't make it work with a loop or a splat.  I tried the latter to create a tuple but got an error:</p>
  
  <pre><code>plot(tuple([heatmap(a[:,:,i], aspect_ratio=:equal, clims=(-1,1)) for i in 1:8]...))
  
  LoadError: MethodError: Cannot `convert` an object of type String to an object of type MethodError
  This may have arisen from a call to the constructor MethodError(...),
  since type constructors fall back to convert methods.
  while loading In[1], in expression starting on line 1
  </code></pre>
  
  <p>What is the best approach here?</p>