SkillAgentSearch skills...

Awesome Latex Drawing

Drawing Bayesian networks, graphical models, tensors, technical frameworks, and illustrations in LaTeX.

Install / Use

npx skills add xinychen/awesome-latex-drawing

Installs into whichever agent you are using.

About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Awesome LaTeX drawing

MIT License repo size GitHub stars

<h6 align="center">Made by Xinyu Chen • :globe_with_meridians: <a href="https://xinychen.github.io">https://xinychen.github.io</a></h6>

awesome-latex-drawing is a collection of 30+ academic drawing examples for using LaTeX, including Bayesian networks, function plotting, graphical models, matrix/tensor computations, and machine learning frameworks.

<br>

Description

LaTeX is a high-quality typesetting system for creating academic graphics. Its popularity stems from its ability to handle complex illustrations with special symbols and mathematical equations, making it ideal for drawing detailed graphics in several scientific areas such as mathematics, physics, and computer science.

This project provides several LaTeX graphics, with examples that are easy to follow on Overleaf. If you are interested, feel free to explore and reproduce our examples on Overleaf at overleaf.com.

<br> <!-- ## Contents ### Table of Examples - **Bayesian networks** - [x] [Bayesian network of Bayesian CP factorization (BCPF)](https://github.com/xinychen/awesome-latex-drawing#example-1) - [x] [Bayesian network of Bayesian Gaussian CP (BGCP) factorization](https://github.com/xinychen/awesome-latex-drawing#example-2) - [x] [Bayesian network of Bayesian augmented tensor factorization (BATF)](https://github.com/xinychen/awesome-latex-drawing#example-3) - [x] [Bayesian network of Bayesian temporal matrix factorization (BTMF)](https://github.com/xinychen/awesome-latex-drawing#example-4) <br> - **Graphical models** - [x] [Partially observed time series matrix and tensor](https://github.com/xinychen/awesome-latex-drawing#example-5) - [x] [Matrix and tensor time series prediction in the presence of missing values](https://github.com/xinychen/awesome-latex-drawing#example-6) - [x] [Undirected and circulant graphs on the relational data samples with certain degrees](https://github.com/xinychen/awesome-latex-drawing#example-7) - [x] [Laplacian convolutional time series modeling](https://github.com/xinychen/awesome-latex-drawing#example-8) <br> - **`pgfplots` function plotting** - [x] [PDF and CDF functions of Erlang distribution](https://github.com/xinychen/awesome-latex-drawing#example-9) - [x] [PDF of normal distribution with different means and variances](https://github.com/xinychen/awesome-latex-drawing#example-10) - [x] [(Joint) PDF functions of Lognormal distributions](https://github.com/xinychen/awesome-latex-drawing#example-11) - [x] [Iterative process of conjugate gradient for solving a system of linear equations](https://github.com/xinychen/awesome-latex-drawing#example-12) - [x] [Random and non-random missing patterns](https://github.com/xinychen/awesome-latex-drawing#example-13) - [x] [Sine and Cosine functions](https://github.com/xinychen/awesome-latex-drawing#example-14) - [x] [Mechanism of time series forecasting](https://github.com/xinychen/awesome-latex-drawing#example-15) <br> - **`tikz` for matrix structure** - [x] [Graphical illustration of the multivariate time series forecasting problem](https://github.com/xinychen/awesome-latex-drawing#example-16) - [x] [Graphical illustration of the temporal matrix factorization](https://github.com/xinychen/awesome-latex-drawing#example-17) - [x] [Graphical illustration of the rolling time series forecasting with temporal matrix factorization](https://github.com/xinychen/awesome-latex-drawing#example-18) <br> - **`tikz-3dplot` for tensor structure** - [x] [Graphical illustration for the (origin, destination, time slot) tensor](https://github.com/xinychen/awesome-latex-drawing#example-19) - [x] [Graphical illustration of the classical CP tensor factorization on a third-order tensor](https://github.com/xinychen/awesome-latex-drawing#example-20) - [x] [Graphical illustration of augmented tensor factorization (AuTF) model](https://github.com/xinychen/awesome-latex-drawing#example-21) - [x] [Graphical illustration of tensor completion task and its framework](https://github.com/xinychen/awesome-latex-drawing#example-22) - [x] [Graphical illustration of low-rank autoregressive tensor completion model](https://github.com/xinychen/awesome-latex-drawing#example-23) - [x] [Graphical illustration of singular value thresholding process of the tensor data with unitary transform](https://github.com/xinychen/awesome-latex-drawing#example-24) - [x] [Graphical illustration of low-rank tensor completion model](https://github.com/xinychen/awesome-latex-drawing#example-25) - [x] [Graphical illustration of low-rank tensor regression model](https://github.com/xinychen/awesome-latex-drawing#example-26) <br> -->

Gallery

Looking for some good LaTeX drawing examples? Here are 30+ graphics for showing how to draw in LaTaX.

Bayesian Networks

LaTeX provides some powerful domain-specific packages and tools like tikz to enable flexible graphical models. Bayesian networks represent a family of graphical models consisting of variables (usually denoted by nodes) and dependency relationships (usually denoted by arrows). Fortunately, tikz has a specific library for drawing Bayesian networks and directed factor graphs.

Another toolbox in Python: https://docs.daft-pgm.org/en/latest/

Bayesian Tensor Factorization

[Example 1]

This example is from the following paper:

<a href="https://github.com/xinychen/awesome-latex-drawing/blob/master/BayesNet/BCPF.tex"> <img src="BayesNet/BCPF.png" alt="drawing" width="280" align="right"/> </a> which shows the Bayesian network of Bayesian CP factorization (BCPF) model. To draw this Bayesian network example, there are some preliminaries to follow: <br>
  • preamble codes:
    1. define the documentclass as standalone, e.g., \documentclass[border = 0.1cm]{standalone} with 0.1cm border,
    2. use the package tikz, i.e., \usepackage{tikz}, and use tikz library like \usetikzlibrary{bayesnet} which is an important tool for drawing Bayesian networks and directed factor graphs,
    3. set the tikz style by using the \tikzstyle{} command,
    4. use math equation environments including \usepackage{amsfonts, amsmath, amssymb}.
  • body codes:
    1. use \begin{tikzpicture} \end{tikzpicture} to start drawing,
    2. use \node to define nodes and text boxes in the Bayesian network,
    3. use \path to define arrows in the Bayesian network,
    4. use \plate to define plates in the Bayesian network.

Please click on the image and check out the source code.

<br>
  • Open BGCP.tex in your overleaf project, then you will see the following pictures about BGCP (Bayesian Gaussian CP decomposition) model as a Bayesian network and a directed factor graph:
<p align="center"> <img align="middle" src="BayesNet/BGCP.png" width="700" /> </p> <br>
[Example 2]

This example is from the following paper:

Xinyu Chen, Zhaocheng He, Lijun Sun (2019). A Bayesian tensor decomposition approach for spatiotemporal traffic data imputation. Transportation Research Part C: Emerging Technologies, 98: 73-84.

<a href="https://github.com/xinychen/awesome-latex-drawing/blob/master/BayesNet/BGCP-1.tex"> <img src="BayesNet/BGCP-1.png" alt="drawing" width="280" align="right"/> </a> which shows the Bayesian network of Bayesian Gaussian CP factorization (BGCP) model. To draw this Bayesian network example, there are some preliminaries to follow:
  • preamble codes:
    1. define the documentclass as standalone, e.g., \documentclass[border = 0.1cm]{standalone} with 0.1cm border,
    2. use the package tikz, i.e., \usepackage{tikz}, and use tikz library like \usetikzlibrary{bayesnet} which is an important tool for drawing Bayesian networks and directed factor graph,
    3. set the tikz style by using the \tikzstyle{} command,
    4. use math equation environments including \usepackage{amsmath, amsfonts, amssymb}.
  • body codes:
    1. use \begin{tikzpicture} \end{tikzpicture} to start drawing,
    2. use \node to define nodes and text boxes in the Bayesian network,
    3. use \path to define arrows in the Bayesian network,
    4. use \plate to define plates in the Bayesian network.

Please click on the image and check out the source code. If you are interested in the original Bayesian network of BGCP in the paper, please check out BGCP.tex.

<br>
[Example 3]

This example is from the following paper:

Xinyu Chen, Zhaocheng He, Yixian Chen, Yuhuan Lu, Jiawei Wang (2019). Missing traffic data imputation and pattern discovery with a Bayesian augmented tensor factorization model. Transportation Research Part C: Emerging Technologies, 104: 66-77.

<a href="https://github.com/xinychen/awesome-latex-drawing/blob/master/BayesNet/BATF.tex"> <img src="BayesNet/BATF.png" alt="drawing" width="300" align="right"/> </a> which shows the Bayesian network of Bayesian augmented tensor factorization (BATF) m

Related Skills

View on GitHub
GitHub Stars2.0k
CategoryEducation
Updated2d ago
Forks190

Languages

TeX

Security Score

100/100

Audited on Aug 5, 2026

No findings