diff grid.jl @ 28:32a53cbee6c5

Resolved merge conflict adding plotting function to grid.jl
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 10 Jan 2019 10:38:42 +0100
parents 9031fe054f2c aff8ea85ca70
children e86c65958aa1 2dce28c59429
line wrap: on
line diff
--- a/grid.jl	Tue Jan 08 11:17:20 2019 +0100
+++ b/grid.jl	Thu Jan 10 10:38:42 2019 +0100
@@ -1,4 +1,5 @@
 module grid
+using Plots
 
 abstract type Grid end
 
@@ -105,4 +106,15 @@
     return points
 end
 
+function plotOnGrid(grid::EquidistantGrid,v::Vector)
+    dim = numberOfDimensions(grid)
+    x = points(grid)
+
+    if dim ==1
+        plot(x,v)
+    else
+        error(string("Plot not implemented for dim =", string(dim)))
+    end
 end
+
+end