Suppose one has a program with many data objects that have pointers to other objects. How could one use TikZ to automatically draw a diagram of the pointer structure?

I'm thinking of outputting the addresses of all the data objects and of the pointers, but I'm not sure how I'd need to parse these data into a format TikZ could then use to draw the graph/network.

For example, for a certain list of the addresses of structs and pointers, TikZ could produce a graph like this:

enter image description here

closed as too broad by user36296, Zarko, Stefan Pinnow, user13907, Werner Oct 24 '16 at 19:39

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I think forest can help you. It can draw trees programmaticly. – Ignasi May 21 '15 at 6:25
  • @Ignasi: Perhaps you could convert this comment into an answer, and maybe even give a short example? I've never heard of forest before. Are there any other packages that "can draw trees programmaticly"? – Geremia May 22 '15 at 23:09
  • @Geremia If you look at the tag for forest you will find lots of examples. The same if you click on the tikz-trees tag or look up the trees tag. It isn't clear what good an example here would so since we have no idea what you've tried or how you are getting the data into your document. I don't understand what that diagram is supposed to show, to be honest. You might be better off looking at TikZ's graph drawing facilities (see the manual) since what you've shown is not, in fact, a tree at all. – cfr Jul 3 '15 at 23:51

Browse other questions tagged or ask your own question.