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.2.tar.gz (19.2 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.2-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file tikzpics-0.1.2.tar.gz.

File metadata

  • Download URL: tikzpics-0.1.2.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for tikzpics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fa05655f2402fdddbbce3fd6b7ae13066b1862b747dade0fdc7ea79acbf1869a
MD5 52db7f0b76a78b418d9d56700f0249d6
BLAKE2b-256 eac0500151326bb299c915963734bbc88875500528c25748199e3b90cdd202e0

See more details on using hashes here.

File details

Details for the file tikzpics-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tikzpics-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for tikzpics-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04389aa04e775cfdbadb28c823a90e69331faf2af8c36b7ccb679761ea7636d9
MD5 2c12aeee03616b5666c6d25296eea253
BLAKE2b-256 0bb7ce7ee2e0ae81c75f5e94c657a79ab5722d43bf4d392c2a215146b2a47fab

See more details on using hashes here.

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