I have some point and a normal vector. I want to plot a plane defined with this normal vector and a point. Analytically, we use formula (for simplicity, in 2d case):
$n_1 (x-x_0) + n_2(y-y_0) = 0$
So, we get an equation and that is it. But how can I do it in programming languages? I mean, what is an algorithm for it?
The following might be a useful approach.
Starting with the general expression for a plane in 3D, solve for z.
$$ n_{1}\left(x-x_{0}\right)+n_{2}\left(y-y_{0}\right)+n_{3}\left(z-z_{0}\right)=0 $$
$$ n_{1}\left(x-x_{0}\right)+n_{2}\left(y-y_{0}\right)=-n_{3}\left(z-z_{0}\right) $$
$$ -\frac{n_{1}}{n_{3}}\left(x-x_{0}\right)-\frac{n_{2}}{n_{3}}\left(y-y_{0}\right)+z_{0}=z $$
Once you have this, you can generate a grid of $x,y$ values then compute the corresponding $z=f\left(x,y\right)$ and plot. The below is an example code which does this along with a figure from the code.
I hope this helps.