BayesNet
TikZ library for drawing Bayesian networks, graphical models and (directed) factor graphs in LaTeX.
ContentsProvides the following node styles:
latent
obs
det
const
factor
plate
gate
Provides the following commands (note that any of the arguments can be empty):
\factor [options] {name} {caption} {inputs} {outputs}
\plate [options] {name} {fitlist} {caption}
\gate [options] {name} {fitlist} {inputs}
\vgate {name} {fitlist-left} {caption-left} {fitlist-right} {caption-right} {inputs}
\hgate {name} {fitlist-top} {caption-top} {fitlist-bottom} {caption-bottom} {inputs}
\edge [options] {inputs} {outputs}
\factoredge [options] {inputs} {factors} {outputs}
UsageInstall the package by copying tikzlibrarybayesnet.code.tex to your LaTeX system or copy the file into projects that are using it. To use the library in your LaTeX file
\usepackage{tikz} \usetikzlibrary{bayesnet} Compile the LaTeX example:
pdflatex example.tex and see the resulting PDF file example.pdf.
Example
链接:
https://github.com/jluttine/tikz-bayesnet
原文链接:
http://weibo.com/1402400261/EsTnqiO2p?ref=collection&type=comment#_rnd1485605925482