How to use custom image as shape in DiagrammeR package?

484 Views Asked by At

Is it possible to use custom shapes with Diagrammer? I've unsucessufully tried to set a path 'img/figure.png' instead of box.

DiagrammeR::grViz("

digraph reprex {

  # a 'graph' statement
  graph [overlap = true, fontsize = 10]

  # several 'node' statements
  node [shape = box, # could be 'img/image.png'? ###########################
        fontname = Helvetica]
  A; B; C; D; E; F

  node [shape = circle,
        fixedsize = true,
        width = 0.9] // sets as circles
  1; 2; 3; 4; 5; 6; 7; 8

  # several 'edge' statements
  A->1 B->2 B->3 B->4 C->A
  1->D E->A 2->4 1->5 1->F
  E->6 4->6 5->7 6->7 3->8
}
")

Created on 2020-07-10 by the reprex package (v0.3.0)

0

There are 0 best solutions below