Python interface to generate (readable) Tikz figures.
Project description
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
fig = TikzFigure()
n1 = fig.add_node(0, 0, shape="circle", color="white", fill="blue", content="Hello!")
n2 = fig.add_node(5, 0, shape="circle", color="white", fill="red", content="Hi!")
fig.draw([n1, n2], options=["->", "line width=2"], color="gray")
fig.show()
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!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tikzpics-0.1.3.tar.gz.
File metadata
- Download URL: tikzpics-0.1.3.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bb3484705a7332417b24e580e87dec3ca5e675bb2b1952deebd8e098ce9373e
|
|
| MD5 |
75b9c500f86b8c27bda1e328115a04e4
|
|
| BLAKE2b-256 |
94116e3f9786e4354247000424512d573d2d1587c6d156e0961ae2b15f610719
|
Provenance
The following attestation bundles were made for tikzpics-0.1.3.tar.gz:
Publisher:
publish_pypi.yml on max-models/tikzpics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tikzpics-0.1.3.tar.gz -
Subject digest:
0bb3484705a7332417b24e580e87dec3ca5e675bb2b1952deebd8e098ce9373e - Sigstore transparency entry: 924589025
- Sigstore integration time:
-
Permalink:
max-models/tikzpics@b1989ff6db5fa0b4f7a64872e454f394a3027690 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/max-models
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@b1989ff6db5fa0b4f7a64872e454f394a3027690 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tikzpics-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tikzpics-0.1.3-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d3eaf1e3543de2b9d56827a8394871e9a301168396fec7a8c725f6ed317dbc4
|
|
| MD5 |
9bde48594145eec79a626d0f9324bc6b
|
|
| BLAKE2b-256 |
71d728effa26d2e3f13e70a0734cf2fb7a54372fdec94252395d54619c980bee
|
Provenance
The following attestation bundles were made for tikzpics-0.1.3-py3-none-any.whl:
Publisher:
publish_pypi.yml on max-models/tikzpics
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tikzpics-0.1.3-py3-none-any.whl -
Subject digest:
5d3eaf1e3543de2b9d56827a8394871e9a301168396fec7a8c725f6ed317dbc4 - Sigstore transparency entry: 924589032
- Sigstore integration time:
-
Permalink:
max-models/tikzpics@b1989ff6db5fa0b4f7a64872e454f394a3027690 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/max-models
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@b1989ff6db5fa0b4f7a64872e454f394a3027690 -
Trigger Event:
push
-
Statement type: