# Issue in plotting data with two components (Stokes problem)

**URL:** https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457
**Category:** General Discussion
**Created:** [January 28, 2022, 2:06pm UTC](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457 "2022-01-28T14:06:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Loic](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Loic](https://community.freefem.org/u/Loic)
#### Post date: [January 28, 2022, 2:06pm UTC](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457/1 "2022-01-28T14:06:09Z")

</div>

Hello all,

I am solving the Stokes problem in 2D (with the two component u and v). Thus I define the FE space for velocity as:

```auto
fespace VhK(ThK, [P2, P2]);

```

and I build a FE array `PhiK` to store the velocity computed (I don’t know why I have to define a second vector in the same time) :

```auto
VhK [PhiK, PhiK2]

```

Thus when I store the values, my array `PhiK` looks like:

`PhiK =[u1, v1, u2, v2, ....................u_N, v_N] `

When I do `plot(PhiK)`, it’s seem’s that only the first component u is plotted.

Could someone help me to plot such data in 2D (with vectors field) ?

Thank you in advance for your help,

Best regards,

Loïc,

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [January 28, 2022, 3:11pm UTC](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457/2 "2022-01-28T15:11:27Z")

</div>

Just plot([PhiK,PhiK2]); like in example [FreeFem-sources/Stokes-eigen.edp at master · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/master/examples/eigen/Stokes-eigen.edp)

---

<div class="post-metadata">

### Author: ![Loic](https://avatars.discourse-cdn.com/v4/letter/l/e9c0ed/32.png) [@Loic](https://community.freefem.org/u/Loic)
#### Post date: [January 28, 2022, 3:34pm UTC](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457/3 "2022-01-28T15:34:31Z")

</div>

Thank you @frederichecht ,

It’s work fine,

Best regards,

Loïc,

---

<div class="post-metadata">

### Author: ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)
#### Post date: [January 28, 2022, 4:02pm UTC](https://community.freefem.org/t/issue-in-plotting-data-with-two-components-stokes-problem/1457/4 "2022-01-28T16:02:03Z")

</div>


