Hi group,

I'm trying to generate the diffusion pattern of a bivariate_normal.
However, so far a main obstacle is to form the distribution on top of a 2D
mesh. The bivariate_normal function from matplotlib.mlab takes axial
arguments that are spit out by numpy.meshgrid. But it's clear that the
underlying mesh construction of meshgrid is different from Grid2D from fipy:

sample meshgrid config:

N = 3
> x = np.linspace(-1.0, 1.0, N)
> y = np.linspace(-1.0, 1.0, N)
> X, Y = np.meshgrid(x, y)
>
> z = bivariate_normal(X, Y, 1., 1., 0., 0.)  # matplotlib.mlab.
> bivariate_normal(*X*, *Y*, *sigmax=1.0*, *sigmay=1.0*, *mux=0.0*, *muy=0.0
> *, *sigmaxy=0.0*)


Is there a way to bridge the two packages or perhaps there's an alternative
to generating 2D distributions under Fipy (maybe manually)?

Thanks,

Yun

-- 
Graduate Group of Ecology Doctoral Candidate
Department of Environmental Science and Policy
Center for Population Biology
University of California, Davis
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to