Mercurial > repos > public > sbplib_julia
changeset 42:c061d1bddba5
Merge latest changes
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 10 Jan 2019 16:49:20 +0100 |
parents | 3d8bfb695497 (diff) 8b04efde1a46 (current diff) |
children | f03e50edd60f |
files | |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/grid.jl Thu Jan 10 15:53:44 2019 +0100 +++ b/grid.jl Thu Jan 10 16:49:20 2019 +0100 @@ -1,5 +1,6 @@ module grid -using PyPlot +using Plots +pyplot() abstract type Grid end @@ -123,13 +124,17 @@ X = repeat(x,1,grid.numberOfPointsPerDim[2]) y = pointsalongdim(grid,2) Y = repeat(y,1,grid.numberOfPointsPerDim[1])' + surface(X,Y,reshape(gridfunction)) elseif numberOfDimensions(grid) == 3 x = pointsalongdim(grid,1) X = repeat(x,1,grid.numberOfPointsPerDim[2]) y = pointsalongdim(grid,2) Y = repeat(y,1,grid.numberOfPointsPerDim[1])' + y = pointsalongdim(grid,2) + Y = repeat(y,1,grid.numberOfPointsPerDim[1])' + surface(X,Y,gridfunction) else - error(string("Plot not implemented for dimension =", string(dim))) + error(string("Plot not implemented for dimension ", string(dim))) end end