makeTikzGraph | R Documentation |
This creates TeX code that can be used to dipslay the hierarchical
structure of CXCursor
and its children and their children.
This can be embedded into a TeX document.
One can customize the appearance of the nodes and edges via Tikz
settings in the TeX document.
makeTikzGraph(cur, genLabel = makeCursorLabel, options = NULL,
siblingDistance = integer(), unit = "cm")
cur |
the CXCursor whose hierarchy we are to display |
genLabel |
a function that creates the text for each node in the tree. That text is displayed for the corresponding node. This is called separately for each node. |
options |
Tikz options in the form of a character vector. These
are inserted into the |
siblingDistance |
an integer value that specifies the distance between nodes at the same level in the hierarchy under the same parent node, i.e. siblings. |
unit |
a character vector giving the unit of measurement for |
This generates text containing the Tikz TeX code.
A character vector containing the Tikz TeX code. This has multiple elements rather than a single element.
Duncan Temple Lang
Tikz http://www.texample.net/tikz/
, http://sourceforge.net/projects/pgf/
libclang http://clang.llvm.org/doxygen/group__CINDEX.html
slr = getRoutines(system.file("exampleCode", "sinLog.c", package = "RCIndex"))
cat(makeTikzGraph(slr$fun), sep = "\n")
cat(makeTikzGraph(slr$fun@def, options = c("font=\tiny", "level distance=1.25cm"),
siblingDistance = structure(c(6, 7, 7, 4, 3), names = c("", 4:7))),
sep = "\n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.