Note that there are some explanatory texts on larger screens.

plurals
  1. POGriddata creating bad shapes scipy
    primarykey
    data
    text
    <p>I am using this <a href="https://docs.google.com/file/d/0Bxv8ab9PeMQVbGRLdGktQXpQb0k/edit" rel="nofollow">code</a> to visualise my data using griddata. The code looks like this:</p> <pre><code>import math import numpy as np from scipy.interpolate import griddata import matplotlib.pyplot as plt **THE LIST C=DATA IS IN THE LINK ABOVE** cx=np.asarray([row[0] for row in C]) cy=np.asarray([row[1] for row in C]) cz=np.asarray([row[2] for row in C]) xi = np.linspace(22.4,22.5,10) yi = np.linspace(37,37.1,10) # grid the data. zi = griddata((cx, cy), cz, (xi[None,:], yi[:,None]), method='nearest') plt.contourf(xi,yi,zi,300,cmap=plt.cm.jet) # draw colorbar plt.colorbar() plt.xlim(xmin=22.4,xmax=22.5) plt.ylim(ymin=37,ymax=37.1) plt.title('no diamonds please') plt.show() </code></pre> <p>As you can see there are some diamond shaped shapes which in fact should have been like the contours of a gaussian like for example shown <a href="http://www.google.com/imgres?start=312&amp;hl=el&amp;biw=1600&amp;bih=730&amp;tbs=imgo:1&amp;tbm=isch&amp;tbnid=RndWbW1jVB4oZM%3a&amp;imgrefurl=http://ammar-hakim.org/sj/je/je1/je1-periodic-poisson.html&amp;docid=ukuFb9_h0EExhM&amp;imgurl=http://ammar-hakim.org/sj/_images/s2-periodic-poisson_2d_src_sol.png&amp;w=800&amp;h=600&amp;ei=FyERUNCPD8f34QTg34DoBA&amp;zoom=1&amp;iact=hc&amp;vpx=1087&amp;vpy=408&amp;dur=472&amp;hovh=194&amp;hovw=259&amp;tx=104&amp;ty=104&amp;sig=106447174075007480182&amp;page=12&amp;tbnh=161&amp;tbnw=215&amp;ndsp=28&amp;ved=1t:429,r:25,s:312,i:176" rel="nofollow">here</a></p> <p>Am i doing something wrong? Should i use some other tool instead of griddata? I had problems using sagemath for this and now switched to ""pure" python. Noob level keep in mind :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload