jluttine / tikz-bayesnet

TikZ library for drawing Bayesian networks, graphical models and (directed) factor graphs in LaTeX.
MIT License
829 stars 147 forks source link

A list of options? #13

Open timudk opened 4 years ago

timudk commented 4 years ago

Can I find a list of options for nodes, edges, etc. somewhere?

jluttine commented 4 years ago

I guess not. If I remember correctly, those options should be (at least mostly) just standard TikZ options. You can have a look on the source code how the options are passed forward: https://github.com/jluttine/tikz-bayesnet/blob/master/tikzlibrarybayesnet.code.tex

For instance, nodes are just normal TikZ nodes with some predefined styles that you can use (obs, latent, ...). You can give any node options TikZ supports. Edge options are forwarded as #1 here: \path (\x) edge [->, >={triangle 45}, #1] (\y) ;. Factor options are forwarded to node. And so on.

Perhaps would be good to mention explicitly in the readme how the options are forwarded so one could have a look on standard TikZ manual for the available options.