I want to use an image as a node in a .dot
program embedded into an Rmarkdown
project.
I can't figure out how to get an image file to appear in the output using DiagrammeR
.
Nodes and HTML-Like labels seem to work, just not the IMG
attribute.
Below is my code so far:
digraph structs {
struct1 [shape=none, label=
<<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\" POINT-SIZE=\"8\">
<TR>
<TD ROWPAN=\"2\">
<FONT POINT-SIZE=\"16\">
Car
</FONT>
</TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD>
<FONT POINT-SIZE=\"10\">
Engine Size
</FONT>
</TD>
</TR>
<TR>
<TD>
<FONT POINT-SIZE=\"10\">
Paint Job
</FONT>
</TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD>
<FONT POINT-SIZE=\"10\">
AutoDrive ()
</FONT>
</TD>
</TR>
</TABLE>>
];
car1 [shape=none, label=\"\", image=\"../resources/images/car-clip-art.png\"];
<-- This doesn't work either. And this comment is *not* in the program -->
car1 [label=
<<TABLE>
<TR>
<TD>
<IMG SCALE=\"FALSE\" SRC=\"../resources/images/car-clip-art.png\"/>
</TD>
</TR>
</TABLE>>
];
struct1->car1
}
Here's the output image:
How can I get the image to show up in the output?