@@ -35,8 +35,11 @@ points2DRelation rel = relFold folder [] rel
36 folder tup acc = (intFromAtomIndex 0 tup, intFromAtomIndex 1 tup) : acc
36 folder tup acc = (intFromAtomIndex 0 tup, intFromAtomIndex 1 tup) : acc
38−graph3DRelation :: Relation -> Graph3D Double Double Double
38+graph3DRelation :: Relation -> [Graph3D Double Double Double]
39+graph3DRelation rel = map lineGraph $ points3DRelation rel
39−graph3DRelation rel = Data3D [Title "rel"] [StepX 1.0, StepY 1.0] $ map (\(x,y,z) -> (fromIntegral x, fromIntegral y, fromIntegral z)) $ points3DRelation rel
41+ lineGraph (x,y,z) = Data3D [Title "rel", Style Lines] [StepX 1.0, StepY 1.0] $ [(fromIntegral x, fromIntegral y, fromIntegral z),
42+ (fromIntegral x, 0, 0)]
41points3DRelation :: Relation -> [(Int, Int, Int)]
44points3DRelation :: Relation -> [(Int, Int, Int)]
42points3DRelation rel = relFold folder [] rel
45points3DRelation rel = relFold folder [] rel
@@ -60,7 +63,7 @@ sample3dRelation = case mkRelationFromList (A.attributesFromList [Attribute "x"
60type G2D = Graph2D Double Double
63type G2D = Graph2D Double Double
61type G3D = Graph3D Double Double Double
64type G3D = Graph3D Double Double Double
63−plotRelation :: Relation -> Either PlotError (Either G2D G3D)
66+plotRelation :: Relation -> Either PlotError (Either G2D [G3D])
64plotRelation rel = let attrTypes = V.replicate (arity rel) IntAtomType in
67plotRelation rel = let attrTypes = V.replicate (arity rel) IntAtomType in
65 if attrTypes /= A.atomTypes (attributes rel) then
68 if attrTypes /= A.atomTypes (attributes rel) then
66 Left InvalidAttributeTypeError
69 Left InvalidAttributeTypeError