creating a subgraph with an image image node, I have tried:
subgraph cluster_1 {
node [ label="" image=“image-name.png”]
}
“image-name.png” is a file that is located in the same directory as the dot file. Is there another syntax that I am not using to accomplish this functionality?
[Please include code as “preformatted text”. Otherwise, the forum software changes certain characters (like ") to non-ascii characters. That makes it very hard to cut-and-paste an example to experiment with it on my system]
This node [ label="" image=“image-name.png”] means (more or less) for all nodes defined within the current subgraph after this point, set label to “” and use the named image But, you have not defined any actual nodes - explicitly or implicitly.
but I get a problem loading image error: " problem loading image /./image-name.png"
My png image is in the same directory as the dot file that I have defined this subgraph.
2.50.0 is fine (nice and new. some folks end up with quite old versions of Graphviz. annoying).
I’m more interested in your OS. My guess is some version of Windows.
" problem loading image /./image-name.png"
This tells me that Graphviz believes that “/” (*C:* to Windows users) is your current working directory. Maybe it is and maybe it isn’t.
The imagepath attribute (imagepath | Graphviz) should solve this.