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)


<https://lh3.googleusercontent.com/-K-nsCh7jQcE/V4CjycA0NBI/AAAAAAAAADI/R2mkyGUKfroWY8mV-bHecTAVZKb13-EMQCLcB/s1600/Screen%2BShot%2B2016-07-09%2Bat%2B09.10.17.png>

If you only need the mesh data, use the gridit function, e.g. (for 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