If the function does not work, it might be the case that Graphviz is not installed, or that the package Graphs is not configured. See installation and configuration.
See also
displayGraph -- displays a digraph or graph using Graphviz
displayNet -- displays a chordal network using Graphivz