You can use the GR framework, e.g.

srand(0)
xd = -2 + 4 * rand(100)
yd = -2 + 4 * rand(100)
zd = [Float64(xd[i] * exp(-xd[i]^2 - yd[i]^2)) for i = 1:100]

using GR
contour(xd, yd, zd, colormap=44)

<https://lh3.googleusercontent.com/-2Jv_GQhoJLE/V4CvWwlK5oI/AAAAAAAAADY/dS2YfieTyIEXfUjXoDCNZdnSg0dcevKDwCLcB/s1600/Screen%2BShot%2B2016-07-09%2Bat%2B10.00.51.png>

If you only need the gridded data, use the GR gridit function, e.g. (to 
obtain a 200 x 200 grid):

x, y, z = GR.gridit(xd, yd, zd, 200, 200)


On Saturday, July 9, 2016 at 12:57:51 AM UTC+2, Kaj Wiik wrote:
>
> Is there a Julia version of irregularly spaced data gridding that does
> zi = griddata(x,y,z,xi,yi), i.e. all arguments are 1d vectors? It seems 
> that Julia interp and contour packages require x, y, z[x,y].
>
>
> https://scipy.github.io/old-wiki/pages/Cookbook/Matplotlib/Gridding_irregularly_spaced_data.html
>
> Thanks,
> Kaj
>
>

Reply via email to