I am trying to do a figure similar to the one attached.

I have exactly a (224x1) vector with dates (x-axis), a (10x1) vector with maturities (y-axis) and a (224x10) matrix with the values (z-axis).

I tried surf(X, Y, Z) but I got an error ("data dimensions must agree").

How can I combine this to make a plot like the one attached?

Thanks, V!

Edit: The second plot is the one I am getting using Luis Mendo's suggestion:

![3d plot](https://i.stack.imgur.com/NDIM5.png)

![enter image description here](https://i.stack.imgur.com/kDFwj.png)