PyTikZ
A primitive Python wrapper for the vector graphics library TikZ
Install / Use
/learn @roger-/PyTikZREADME
Description
PyTikZ is a simple Python to TikZ translator. It's probably good enough to generate some basic diagrams (and importantly avoid TeX loops), but you may need to edit the output due to missing functionality and bugs.
Some basic documentation can be found in tikz.py
Examples
The output of the following code should be more-or-less equivalent to this:
import tikz
pic = tikz.Picture('thick')
circle_size = 0.42
circle_pos = [(0, 0), (1, 0), (2, 0), (2, 1), (1, 2)]
with pic.path('draw') as draw:
draw.at(0 + 0j).grid_to(3 + 3j)
with pic.path('fill') as fill:
for pos in circle_pos:
fill.at(pos).circle(circle_size)
print(pic.make())
License
All of the code contained here is licensed by the GNU General Public License v3.
Copyright (C) 2014 by Roger https://github.com/roger-
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
