Skip to main content

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

tikzpics-0.1.3.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tikzpics-0.1.3-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

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

Hashes for tikzpics-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0bb3484705a7332417b24e580e87dec3ca5e675bb2b1952deebd8e098ce9373e
MD5 75b9c500f86b8c27bda1e328115a04e4
BLAKE2b-256 94116e3f9786e4354247000424512d573d2d1587c6d156e0961ae2b15f610719

See more details on using hashes here.

Provenance

The following attestation bundles were made for tikzpics-0.1.3.tar.gz:

Publisher: publish_pypi.yml on max-models/tikzpics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for tikzpics-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5d3eaf1e3543de2b9d56827a8394871e9a301168396fec7a8c725f6ed317dbc4
MD5 9bde48594145eec79a626d0f9324bc6b
BLAKE2b-256 71d728effa26d2e3f13e70a0734cf2fb7a54372fdec94252395d54619c980bee

See more details on using hashes here.

Provenance

The following attestation bundles were made for tikzpics-0.1.3-py3-none-any.whl:

Publisher: publish_pypi.yml on max-models/tikzpics

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page