# Plotting magnitude of a vector

**URL:** https://community.freefem.org/t/plotting-magnitude-of-a-vector/723
**Category:** General Discussion
**Created:** [January 4, 2021, 10:44am UTC](https://community.freefem.org/t/plotting-magnitude-of-a-vector/723 "2021-01-04T10:44:06Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [January 4, 2021, 10:52am UTC](https://community.freefem.org/t/plotting-magnitude-of-a-vector/723/2 "2021-01-04T10:52:39Z")

</div>

So common that it writes literally as you want it to be written.

```auto
mesh Th = square(10, 10);
fespace Wh(Th, [P2, P2]);
fespace Vh(Th, P2);
Wh [ux, uy] = [x, y];
Vh magnitude = sqrt(ux^2+uy^2);
plot(magnitude);

```

---

_[View the full topic](https://community.freefem.org/t/plotting-magnitude-of-a-vector/723)._
