# Subplot(xyz)

**URL:** https://discourse.julialang.org/t/subplot-xyz/22432
**Category:** Performance
**Tags:** plotting
**Created:** [March 27, 2019, 9:51pm UTC](https://discourse.julialang.org/t/subplot-xyz/22432 "2019-03-27T21:51:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Aquaman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquaman/32/6586_2.png) [@Aquaman](https://discourse.julialang.org/u/Aquaman)
#### Post date: [March 27, 2019, 9:51pm UTC](https://discourse.julialang.org/t/subplot-xyz/22432/1 "2019-03-27T21:51:49Z")

</div>

Dear All,

how can I use subplot in the following way?

In matlab:

```julia
nn =2;
subplot(2,2,nn);

```

In Julia

```julia
using PyPlot
 nn = 2
subplot(12nn)

```

`ValueError('Integer subplot specification must be a three-digit number, not 36',)`

Is this a bug in PyPlot?

---

<div class="post-metadata">

### Author: ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)
#### Post date: [March 27, 2019, 9:56pm UTC](https://discourse.julialang.org/t/subplot-xyz/22432/2 "2019-03-27T21:56:06Z")

</div>

With PyPlot, you _can_ do  
`subplot(2,2,nn)`

---

<div class="post-metadata">

### Author: ![Aquaman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aquaman/32/6586_2.png) [@Aquaman](https://discourse.julialang.org/u/Aquaman)
#### Post date: [March 27, 2019, 9:58pm UTC](https://discourse.julialang.org/t/subplot-xyz/22432/3 "2019-03-27T21:58:45Z")

</div>

Okay, It is solved! thanks very much!!!
