Skip to content

PlotNeuralNet

LaTeX code for drawing neural network diagrams for reports and presentations.

Stars
25.1k
Forks
3.1k
Licence
MIT
Language
TeX
Last update
3.2 years ago
Type
Library

No commits in over a year — check for forks or alternatives before adopting.

What it is

PlotNeuralNet is a collection of LaTeX code that lets you draw neural network architecture diagrams, such as convolutional networks, by writing a description rather than drawing by hand. It is aimed at producing figures for research papers, reports, and presentations. The README also includes a Python interface that builds the LaTeX file from a Python list of layers.

  • Draw a convolutional network diagram such as the FCN-8 or FCN-32 examples shown in the README
  • Generate a LaTeX figure from a Python list of layers using the to_Conv, to_Pool and to_SoftMax helpers
  • Edit an existing example in Overleaf and adapt it to your own architecture

Great for

  • Researchers who want clean architecture figures for papers
  • Students writing reports that include a neural network diagram
  • People already comfortable with LaTeX or Overleaf
  • Users who prefer generating diagrams from code so they can be edited and version-controlled

Not ideal for

  • People who need a quick drag-and-drop diagram tool, since it requires writing code and a LaTeX setup
  • Users without a LaTeX installation who cannot install TeX packages, since the README requires several texlive packages or MiKTeX
  • Anyone needing diagrams of architectures beyond the layer shapes listed, since the README's TODO notes more shapes and RNN examples are still planned
Step-by-step guide: how to use PlotNeuralNetInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Clone and build from source

    You'll need: LaTeX distribution (texlive on Ubuntu, or MiKTeX on Windows) · Git bash or Cygwin on Windows · Python (for the Python interface)

    Install LaTeX packages on Ubuntu 18.04.2 (from README)

    sudo apt-get install texlive-latex-base

    Install additional fonts and extras on Ubuntu (from README)

    sudo apt-get install texlive-fonts-extra

    Clone the repository

    git clone https://github.com/HarisIqbal88/PlotNeuralNet
  2. 2

    Run it

    • Clone the repository and install the LaTeX packages for your system
    • Change into the examples directory: cd pyexamples/
    • Run the example: bash ../tikzmake.sh test_simple
    • Check the generated output to confirm the diagram was built
  3. 3

    Get the most out of it

    • Start from an existing example in the examples directory and modify it
    • Use the Python interface (pycore/tikzeng) to define architectures as a list of layers
    • Use to_connection to link layers in the diagram
    • Open the example files on Overleaf, as linked from the README examples

Downloads

Strengths

  • Produces LaTeX-quality figures that fit into academic documents
  • Diagrams are plain text, so they can be versioned and edited
  • MIT licensed and widely used, with a DOI-referenced release on Zenodo

Trade-offs

  • Requires a working LaTeX installation, which can be large and fiddly on some systems
  • Setup instructions in the README are dated (Ubuntu 16.04 and 18.04 references) and the Windows path needs a bash runner
  • README lists unfinished items such as a legend feature and RNN examples

How it compares

ProjectStarsTypeLevelUpdatedBest for
PlotNeuralNet (this)25.1kLibraryintermediate3.2 years agoResearchers who want clean architecture figures for papers
marktext63.5kAppbeginner4 days agoPeople who write notes or articles in Markdown and want a clean, minimal editor
KaTeX20.5kLibrarybeginner7 days agoWebsite builders who want readable equations in articles, docs or course pages
LaTeX-OCR16.6kAI model / agentintermediate1.8 years agoStudents who want to turn a handwritten or printed formula photo into editable LaTeX
the-incredible-pytorch12.7kCurated listbeginner6 days agoBeginners looking for PyTorch tutorials and example projects to work through

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.