Skip to content

Commit 82d39bc

Browse files
author
Martin D. Maas
committed
use Surface for data
1 parent fde5cb5 commit 82d39bc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/pipeline.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,17 @@ function RecipesPipeline.add_series!(plt::Plot, plotattributes)
392392
return _add_the_series(plt, sp, plotattributes)
393393
end
394394

395+
function cubic_interp_2d( x, y, data, s )
396+
spl = Spline2D(y, x, data; kx=3, ky=3, s=0.0)
397+
finerx = LinRange(x[1], x[end], s[1])
398+
finery = LinRange(y[1], y[end], s[2])
399+
data_interp = Array{Float64}(undef, s[2], s[1])
400+
for (i,yint) enumerate(finery), (j,xint) enumerate(finerx)
401+
data_interp[i,j] = evaluate(spl, yint, xint)
402+
end
403+
return finerx, finery, data_interp
404+
end
405+
395406
# getting ready to add the series... last update to subplot from anything
396407
# that might have been added during series recipes
397408
function _prepare_subplot(plt::Plot{T}, plotattributes::AKW) where {T}

0 commit comments

Comments
 (0)