# Plot randomly oriented gaussian kernel

I would like to plot with scipy randomly oriented gaussian kernels. For a gaussian kernel along x and y axis (with an angle 0 w.r.t. coordinate system), I simply plot function

$height*(\frac{\exp(-(((c_x-x)/w_x)^{2}+((c_y-y)/w_y)^{2})}{2})$

with $c_x$, $c_y$ coordinates for kernel's center, and $w_x$, $w_y$ width (variance parameters).

I would like now the ellipsis to be 'oriented' with a given angle. I struggle to find how to implement it. Could smbd help?

Thanks

-
Is the question related to a specific programming language like MATLAB? –  Seyhmus Güngören Aug 19 '12 at 11:50
I am writting with Python. It does not matter I think. BTW it is multivariate gaussian, so that I have a hint I should add a cross x-y term in exponential. however I would appreciate more precise explanation or pointer to some reference –  antitrust Aug 19 '12 at 12:05
Cross terms are necessary if there is dependency between $X$ and $Y$. I never used Python but I was able to plot a 2-variate pdf in MATLAB with mesh command and I was also able to adjust the angles how I like. –  Seyhmus Güngören Aug 19 '12 at 12:10