# harisiqbal88/plotneuralnet architecture

> Architecture diagram of the GitHub repository harisiqbal88/plotneuralnet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/harisiqbal88/plotneuralnet
- Repository: https://github.com/harisiqbal88/plotneuralnet

## Overview

PlotNeuralNet is a diagram-authoring toolkit: users describe neural-network layouts in Python or LaTeX, then use reusable layer and block definitions to produce TikZ/LaTeX diagrams. The Python path builds snippets and writes a .tex file; the repository also provides hand-authored LaTeX examples. The README describes running a shell script with a TeX installation, but the script’s behavior was not sampled, so compilation details are not expanded here.

Main entry points: [`pycore/tikzeng.py`](https://github.com/harisiqbal88/plotneuralnet/blob/master/pycore/tikzeng.py) (TikZ primitives), [`pyexamples/unet.py`](https://github.com/harisiqbal88/plotneuralnet/blob/master/pyexamples/unet.py) (Python architecture), [`pycore/blocks.py`](https://github.com/harisiqbal88/plotneuralnet/blob/master/pycore/blocks.py) (Reusable blocks), [`examples`](https://github.com/harisiqbal88/plotneuralnet/tree/master/examples) (LaTeX examples)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Diagram authoring"]
  node_python_arch["Python architecture<br/>[unet.py]"]
  node_latex_examples["LaTeX examples"]
end

subgraph group_python["Python interface"]
  node_blocks["Reusable blocks<br/>[blocks.py]"]
  node_primitives["TikZ primitives<br/>[tikzeng.py]"]
end

subgraph group_latex["LaTeX rendering"]
  node_tex_output["Generated TeX"]
  node_layer_styles["Layer styles<br/>[init.tex]"]
  node_tex_engine["TeX renderer"]
  node_diagram["Diagram output"]
end

subgraph group_examples["Network examples"]
end

node_user(("Diagram author"))

node_user -->|"authors layout"| node_python_arch
node_user -->|"uses examples"| node_latex_examples
node_python_arch -->|"uses blocks"| node_blocks
node_python_arch -->|"builds with"| node_primitives
node_blocks -->|"delegates to"| node_primitives
node_primitives -->|"writes TeX"| node_tex_output
node_primitives -->|"includes styles"| node_layer_styles
node_tex_output -.->|"compiled by"| node_tex_engine
node_tex_engine -.->|"renders"| node_diagram

click node_python_arch "https://github.com/harisiqbal88/plotneuralnet/blob/master/pyexamples/unet.py"
click node_latex_examples "https://github.com/harisiqbal88/plotneuralnet/tree/master/examples"
click node_blocks "https://github.com/harisiqbal88/plotneuralnet/blob/master/pycore/blocks.py"
click node_primitives "https://github.com/harisiqbal88/plotneuralnet/blob/master/pycore/tikzeng.py"
click node_layer_styles "https://github.com/harisiqbal88/plotneuralnet/blob/master/layers/init.tex"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_python_arch,node_latex_examples toneBlue
class node_blocks,node_primitives toneAmber
class node_tex_output,node_layer_styles,node_tex_engine,node_diagram toneMint
class node_user toneIndigo
```

## Components

### Diagram authoring

- [Python architecture](https://github.com/harisiqbal88/plotneuralnet/blob/master/pyexamples/unet.py): `pyexamples/unet.py`
- [LaTeX examples](https://github.com/harisiqbal88/plotneuralnet/tree/master/examples): `examples`

### Python interface

- [Reusable blocks](https://github.com/harisiqbal88/plotneuralnet/blob/master/pycore/blocks.py): `pycore/blocks.py`
- [TikZ primitives](https://github.com/harisiqbal88/plotneuralnet/blob/master/pycore/tikzeng.py): `pycore/tikzeng.py`

### LaTeX rendering

- **Generated TeX**
- [Layer styles](https://github.com/harisiqbal88/plotneuralnet/blob/master/layers/init.tex): `layers/init.tex`
- **TeX renderer**
- **Diagram output**

### Other components

- **Diagram author**

## Connections

- Diagram author → Python architecture: authors layout (evidence: `README.md`)
- Diagram author → LaTeX examples: uses examples (evidence: `README.md`)
- Python architecture → Reusable blocks: uses blocks (evidence: `pyexamples/unet.py`)
- Python architecture → TikZ primitives: builds with (evidence: `pyexamples/unet.py`)
- Reusable blocks → TikZ primitives: delegates to (evidence: `pycore/blocks.py`)
- TikZ primitives → Generated TeX: writes TeX (evidence: `pycore/tikzeng.py`)
- TikZ primitives → Layer styles: includes styles (evidence: `pycore/tikzeng.py`)
- Generated TeX → TeX renderer: compiled by
- TeX renderer → Diagram output: renders
