Skip to content

Commit e4b922f

Browse files
authored
Merge pull request #108 from sisl/moss/coverage
Fix coverage and better GraphPlot styles
2 parents 43d415e + 2e89e84 commit e4b922f

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "BayesNets"
22
uuid = "ba4760a4-c768-5bed-964b-cf806dc591cb"
3-
version = "3.3.0"
3+
version = "3.3.1"
44

55
[deps]
66
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
@@ -28,7 +28,7 @@ DataFrames = "0.21"
2828
DataStructures = "0.11,0.12,0.13,0.14,0.15,0.16,0.17"
2929
Discretizers = "3.0"
3030
Distributions = "0.17,0.18,0.19,0.20,0.21,0.22,0.23"
31-
GraphPlot = "0.4,0.4.1"
31+
GraphPlot = "0.3,0.3.1,0.4,0.4.1"
3232
IterTools = "1.3"
3333
LightGraphs = "1.0"
3434
LightXML = "0.8,0.9"

src/BayesNets.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import Base: *, /, +, -
1919
import DataStructures: PriorityQueue, peek
2020
import BayesNets.CPDs.ProbabilisticGraphicalModels: markov_blanket, is_independent, infer
2121
import StatsBase: sample, Weights
22-
import GraphPlot: gplot
22+
import GraphPlot: gplot, stressmajorize_layout
2323
import LightGraphs: DiGraph, add_edge!, rem_edge!,
2424
add_vertex!, rem_vertex!, has_edge,
2525
edges, topological_sort_by_dfs, inneighbors,

src/DiscreteBayesNet/greedy_thick_thinning.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
type GreedyThickThinning <: GraphSearchStrategy
2+
mutable struct GreedyThickThinning <: GraphSearchStrategy
33
cache::ScoreComponentCache
44
max_n_parents::Int
55
prior::DirichletPrior

src/io.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ lualatex_available() = try success(`lualatex -v`) catch; false end
55
Base.showable(::MIME"image/svg+xml", bn::BayesNet) = true
66

77

8-
plot(dag::DAG, nodelabel) = gplot(dag, nodelabel=nodelabel) # GraphPlot (default)
8+
plot(dag::DAG, nodelabel) = gplot(dag,
9+
nodelabel=nodelabel,
10+
layout=stressmajorize_layout,
11+
nodefillc="lightgray",
12+
edgestrokec="black",
13+
EDGELINEWIDTH=0.3) # GraphPlot (default plotting)
14+
915

1016
# called at runtime (replaces plot with TikzGraphs, if loaded)
1117
function __init__()

0 commit comments

Comments
 (0)