lib.notebook.getDot

pyagrum.lib.notebook.getDot(dotstring, size=None)

get an HTML representation of a dot string

Parameters:
  • dotstring (str) – the dot string

  • size (float|str) – size (for graphviz) of the rendered graph

Return type:

str

Returns:

the HTML representation of the dot string

Example

import pyagrum.lib.notebook as gnb

html = gnb.getDot("digraph { A -> B; }")
html.startswith("<svg")
# True