Skip to content

Commit bca01e6

Browse files
authored
Merge pull request #125 from JuliaRobotics/fix/3Q19/56
draw graph circles squares
2 parents 35db02e + 1a289fc commit bca01e6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/GraphsDFG/services/GraphsDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function attributes(v::GraphsNode, g::T)::AttributeDict where T <:GenericInciden
77
AttributeDict(
88
"label" => v.dfgNode.label,
99
"color" => v.dfgNode isa DFGVariable ? "red" : "blue",
10-
"shape" => v.dfgNode isa DFGVariable ? "box" : "ellipse",
10+
"shape" => v.dfgNode isa DFGVariable ? "ellipse" : "box",
1111
"fillcolor" => v.dfgNode isa DFGVariable ? "red" : "blue"
1212
)
1313
end

src/entities/DFGVariable.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ mutable struct VariableNodeData
1515
inferdim::Float64
1616
ismargin::Bool
1717
dontmargin::Bool
18+
# Tonio surprise TODO
19+
# frontalonly::Bool
1820
# A valid, packable default constructor is needed.
1921
VariableNodeData() = new(zeros(1,1), zeros(1,1), Symbol[], Int[], 0, false, :NOTHING, Symbol[], "", false, false, false, false)
2022
VariableNodeData(x1::Array{Float64,2},

test/interfaceTests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ end
303303
addVariable!(dotdfg, v2)
304304
addFactor!(dotdfg, [v1, v2], f1)
305305

306-
@test toDot(dotdfg) == "graph graphname {\n2 [\"label\"=\"b\",\"shape\"=\"box\",\"fillcolor\"=\"red\",\"color\"=\"red\"]\n2 -- 3\n3 [\"label\"=\"f1\",\"shape\"=\"ellipse\",\"fillcolor\"=\"blue\",\"color\"=\"blue\"]\n1 [\"label\"=\"a\",\"shape\"=\"box\",\"fillcolor\"=\"red\",\"color\"=\"red\"]\n1 -- 3\n}\n"
306+
@test toDot(dotdfg) == "graph graphname {\n2 [\"label\"=\"b\",\"shape\"=\"ellipse\",\"fillcolor\"=\"red\",\"color\"=\"red\"]\n2 -- 3\n3 [\"label\"=\"f1\",\"shape\"=\"box\",\"fillcolor\"=\"blue\",\"color\"=\"blue\"]\n1 [\"label\"=\"a\",\"shape\"=\"ellipse\",\"fillcolor\"=\"red\",\"color\"=\"red\"]\n1 -- 3\n}\n"
307307
@test toDotFile(dotdfg, "something.dot") == nothing
308308
Base.rm("something.dot")
309309

0 commit comments

Comments
 (0)