Analiz...::graph(3pm)

πŸ“¦
version 1.25.5 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’… NAME ✨

analizo-graph β€” the dependency graph generator, bestie. it literally draws you a map of who calls whom πŸ’–

this page lives in the User Contributed Perl Documentation section of the manual, under Analiz...::graph(3pm), and yes we're gonna walk through every single bit of it together 🫢


🌸 USAGE 🌸

analizo graph [OPTIONS] <input> [<input> [<input> ...]]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. analizo graph reads the dependency info out of one or more source code directories that you pass as arguments, and it spits out the graph of dependencies between the modules of the software β€” in graphviz(1) format. it's giving "here's the whole vibe of your codebase as a picture" ✨

and fyi analizo graph is part of the analizo suite. iykyk πŸ‘‘


πŸŽ€ REQUIRED ARGUMENTS πŸŽ€

  • <input>... β€” the input directories (or files) with source code to be processed, periodt.

so like, technically you can pass individual files as input, but this tool is so much more useful if you pass entire source directories. lowkey important: if you only pass a couple of files, their dependencies on modules that are not declared and/or implemented in those files just won't be calculated. πŸ™ˆ the graph will be missing stuff and you'll be like "where'd it go" β€” so yeah, whole directories, bestie.


πŸ’– OPTIONS πŸ’–

  • --omit <functions> β€” omit the given functions from the call graph. multiple function names? separate them with commas. bye girl, we don't need you on this graph πŸ’…
  • --cluster β€” cluster the functions into files, so you can actually see which files the calling and called functions live in. it's giving organizational harmony 🌈
  • --modules β€” group the functions by modules (files or OO classes) and only represent calls between modules. super useful when you wanna see the dependencies between the modules of the program instead of obsessing over specific functions (main character energy only for modules now, sorry). the arrows between modules get labelled with a number that represents the number of different places in which the calling module calls functions in the called module β€” i.e. how many times module A calls module B. πŸ”₯

also just so you know: it doesn't make much sense to use --modules together with --cluster. they're not enemies, they just don't vibe together.

  • --extractor <extractor> β€” define which extractor method to use to parse the source code. currently Doxyparse is the only extractor available. default is Doxyparse. ⭐
  • --output <file>, -o <file> β€” use a file as output. classic.

🌈 VIEWING THE GRAPH 🌈

to view the generated graph, you pipe analizo's output into one of the Graphviz tools. you can use dotty(1) to display the graph in a X11 window:

$ analizo graph src/ | dotty -

you can also generate a file to print or include in a document by using the dot(1).

to generate a PNG image called graph.png:

$ analizo graph src/ | dot -Tpng -ograph.png -

to generate a PostScript version of the dependency graph for printing, you can also use the dot. for example, to generate a dependency graph in the file graph.ps fitting everything on a US letter size page in landscape mode, try:

$ analizo graph src/ | dot -Grotate=90 -Gsize=11,8.5 -Tps -o graph.ps

sometimes, the graph will fit better if the dependency arrows go from left to right instead of top to bottom. the dot option -Grankdir=LR will do that:

$ analizo graph src/ | dot -Gsize=8.5,11 -Grankdir=LR -Tps -o graph.ps

for large software, the graph may end up too small to comfortably read 😭 (the struggle). if that happens, try N-up printing:

$ analizo graph src/ | dot -Gpage=8.5,11 -Tps -o graph.ps

you can also try playing with other dot options such as -Gratio, or for a different style of graph, try using neato instead of dot. see the Graphviz documentation for more info about the various options available for customizing the style of the graph. go wild, customize, slay πŸŽ€


🧚 READING THE GRAPH 🧚

when generating a graph at the function level (i.g. without the --modules option), function calls are displayed as solid arrows. a dotted arrow means that the function the arrow points from takes the address of the function the arrow points to β€” this typically indicates that the latter function is being used as a callback. so dotted = "it's a callback thing" πŸ“ž

when the --modules option is on, then there are only solid arrows. an arrow from A to B means that A depends on B. simple as that, no cap. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

dotty(1), dot(1), neato(1), analizo(1)


See analizo(1).


okay that's the whole page bestie πŸ’– this was Analiz...::graph(3pm), perl v5.40.1, dated 2025-12-13, under User Contributed Perl Documentation. go forth, generate graphs, and remember: pass whole directories 🫢✨ πŸ’…

πŸ“¦ where this page comes from