This package provides a way to create, compile, view, and save figures based on the LaTeX package TikZ & PGF. It makes the creation of TikZ figures easier when (part of) the underlying data is computed, and makes the preview and debugging of figures within a Jupyter notebook seamless.
Python code adapted from the TikZ documentation:
coords = [(0, 0), (0, 2), (1, 3.25), (2, 2), (2, 0), (0, 2), (2, 2), (0, 0), (2, 0)]
pic = Picture()
pic.draw(line(coords), thick=True, rounded_corners='4pt')
pic.write_image('nikolaus.pdf')
The distribution package is called pytikz
and can be installed from this repository:
pip install git+https://github.com/allefeld/pytikz.git
Note that the import package is called tikz
.
A tutorial illustrating the use of pytikz is provided in the form of a Jupyter notebook pytikz.ipynb
. It is best viewed through nbviewer.
This software is copyrighted © 2020 by Carsten Allefeld and released under the terms of the GNU General Public License, version 3 or later.