Skip to main content

Tikzpics

Python interface to generate (readable) Tikz figures.

Install

Create and activate python environment, then install tikzpics with

pip install tikzpics

Examples

Generate tikz-figures with Python API

Generate two nodes connected by an arrow, see Figure 1.

from tikzpics import TikzFigure

fig = TikzFigure()

n1 = fig.add_node(0, 0, shape="circle", color="white", fill="blue", content="Tikz")
n2 = fig.add_node(2, 0, shape="circle", color="white", fill="red", content="Pics")

fig.draw([n1, n2], options=["->", "line width=2"], color="gray")

fig.show()

You can also save the figure as a .tikz file or print the LaTeX code:

print(fig)
% --------------------------------------------- %
% Tikzfigure generated by tikzpics v0.1.3       %
% https://github.com/max-models/tikzpics        %
% --------------------------------------------- %
\begin{tikzpicture}
    \node[shape=circle, color=white, fill=blue] (node0) at (0, 0) {Tikz};
    \node[shape=circle, color=white, fill=red] (node1) at (2, 0) {Pics};
    \draw[->, line width=2, color=gray] (node0) to (node1);
\end{tikzpicture}

Note that to visualize the plots in a popup or in jupyterlab, install with pip install "tikzpics[vis]"

IPython Magic Commands

tikzpics includes IPython magic commands for compiling TikZ figures directly in Jupyter notebooks!

Load the extension:

%load_ext tikzpics.ipython

Then use the %%tikz cell magic:

%%tikz
\begin{tikzpicture}
\draw[thick, blue] (0,0) circle (2cm);
\node at (0,0) {Hello TikZ!};
\end{tikzpicture}

See tutorials for more examples!

Metadata

Release files for tikzpics 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tikzpics 0.1.4
File Size Uploaded
tikzpics-0.1.4.tar.gz 36.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tikzpics 0.1.4
File Interpreter ABI Platform
tikzpics-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 78.8 kB

Release files / tikzpics-0.1.4.tar.gz

Download URL tikzpics-0.1.4.tar.gz
Size 36.1 kB
Tags Source
SHA-256 checksum
How to use checksums
deb4cf2313d4f50fd70dfd06677728c20461983e7ddaf914759f4e8d85836535
BLAKE2b-256 checksum
How to use checksums
8fedc81d5a697082a3696a5ac5073c8628dae570f5c9c38d6b4c08a0629be72c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.

Transparency log

Release files / tikzpics-0.1.4-py3-none-any.whl

Download URL tikzpics-0.1.4-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f64d70c1b6d81ac9f2b9e6412196fe1dd374a2905ead4ac8e09ed775b4c1d9f4
BLAKE2b-256 checksum
How to use checksums
2996f7ebad0de1a74eb01a542e45039f004a90cbaf8a5c4f4c57a8e19cd87e00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page