title: Contour plot of an extrapolated anonymous function in Julia
body: <p>I created a 64x64 random 2D array in Julia, and then interpolated it using <code>Interpolations.jl</code>:</p>
  
  <pre><code>using Interpolations
  using Plots
  gr()
  x = range(-10., length=64, stop=10.)
  y = range(-10., length=64, stop=10.)
  
  v_unscaled = interpolate(potential, BSpline(Cubic(Line(OnCell()))))
  v_scaled = Interpolations.scale(v_unscaled, x, y)
  v = extrapolate(v_scaled, 0) 
  
  p_int = contour(x, y, v_scaled, fill=true)
  display(p_int)
  
  p = contour(x, y, v, fill=true)
  display(p)
  </code></pre>
  
  <p>When I plot the extrapolated function <code>v</code>, the non-zero part of the contour is shrunk to the lower left corner which is not as expected, because in the specified domain, the two plots should look the same. What is wrong with the procedures above?</p>
  
  <p><a href="https://i.stack.imgur.com/bl21w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bl21w.png" alt="plot"></a></p>