Skip to content

GraphPlot.jl Incompatibility #148

@andreaperin

Description

@andreaperin

Hi,

I am trying to run this simple code:

using BayesNets

CPDa = StaticCPD(:a, Normal(1.0))
CPDb = LinearGaussianCPD(:b, [:a], [2.0], 3.0, 1.0)
CPDb(:a => 0.5)
rand(CPDb, :a => 0.5) # condition and then sample
pdf(CPDb, :a => 4.0, :b => 3.0)

bn = BayesNet([CPDa, CPDb])

and I got this error:

ERROR: MethodError: no method matching stressmajorize_layout(::Graphs.WARNING: both ProbabilisticGraphicalModels and IterTools export "groupby"; uses of it in module BayesNets must be qualified
SimpleGraphs.SimpleDiGraph{Int64})
Closest candidates are:
  stressmajorize_layout(::LightGraphs.AbstractGraph) at ~/.julia/packages/GraphPlot/vrIy8/src/stress.jl:58
  stressmajorize_layout(::LightGraphs.AbstractGraph, ::Int64) at ~/.julia/packages/GraphPlot/vrIy8/src/stress.jl:58
  stressmajorize_layout(::LightGraphs.AbstractGraph, ::Int64, ::Any) at ~/.julia/packages/GraphPlot/vrIy8/src/stress.jl:58

Downgrading GrapPlot to 0.4.1 works, but is a very outdated version (more than 2 y.o.).

Graphplot is now at version 0.5.2 and since 0.4.4(allowed in your last version) migrates fromLightGraphs to Graphs. Maybe the usage of an outdated GraphPlot version could be the problem.

Best regards,

Andrea

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions