I have a plane that passes throught the origin. It has a red graph inside it, and a green vector (with origin in the center, $(0,0,0)$) that is orthogonal to the mentioned plane.
What I want is to obtain the view of the plane in an image 2D without losing the way the red plot is in the plane. How can I do this? I know that this is basically a rotation of the plane, but my calculations got very messy, so if someone could just give me clear instructions of how to do this as easy as possible, I will be thankful for it.

Let's suppose your function is $f(x,y,z)$ and you want to transform it into $g(x,y,0)$. You can do that by rotating the green vector $(n_x,n_y,n_z)$ to point vertically up, along $z$ in your figure. First, calculate how much you need to rotate. The angle between the vertical and your normal to the plane, let's call it $\theta$ is given by the dot product:$$\cos\theta=\hat n\cdot\hat z=n_z$$ I assumed that $|\hat n|=1$. If $n_z=1$, you don't need to do anything. If $\hat n=-1$, the figure is upside down. So $$g(x,y,0)=f(-x,-y,0)$$ Normal up or down implies that your plane is the $xy$ plane.
If $|n_z|<1$, you can use the cross product to the the axis of rotation: $$\hat r=\hat n\times\hat z=n_y\hat x-n_x\hat y$$ Then just use the formula on wikipedia to calculate the rotation matrix $R$. Then calculate $$(x', y', z')^T=R(x,y,z)^T$$ If you did everything right, $z'=0$. Then $g(x',y',0)=f(x,y,z)$.