@@ -993,8 +993,14 @@ function treeGraphFigure(
993993 labelPlacement,
994994 showFactorLabels
995995 )
996- variableX = [levelX[depth] for depth in variableDepths]
997- factorX = [levelX[depth] for depth in factorDepths]
996+ variableX = zeros (Float64, length (graph. variables))
997+ factorX = zeros (Float64, length (graph. factors))
998+ for index in view. variables
999+ variableX[index] = levelX[variableDepths[index]]
1000+ end
1001+ for index in view. factors
1002+ factorX[index] = levelX[factorDepths[index]]
1003+ end
9981004 variableY = zeros (Float64, length (graph. variables))
9991005 factorY = zeros (Float64, length (graph. factors))
10001006
@@ -1298,8 +1304,14 @@ function verticalTreeGraphFigure(
12981304 )
12991305 variableX = zeros (Float64, length (graph. variables))
13001306 factorX = zeros (Float64, length (graph. factors))
1301- variableY = [levelY[depth] for depth in variableDepths]
1302- factorY = [levelY[depth] for depth in factorDepths]
1307+ variableY = zeros (Float64, length (graph. variables))
1308+ factorY = zeros (Float64, length (graph. factors))
1309+ for index in view. variables
1310+ variableY[index] = levelY[variableDepths[index]]
1311+ end
1312+ for index in view. factors
1313+ factorY[index] = levelY[factorDepths[index]]
1314+ end
13031315
13041316 for depth in 1 : maxDepth
13051317 nodes = Tuple{Symbol, Int}[]
0 commit comments