o
odin.langpkg.dev
packages / library / matplotlib-odin

matplotlib-odin

af9743dlibrary

Plot with Matplotlib in Odin.

MIT · updated 1 year ago

Matplotlib.odin

This project binds Matplotlib library to the Odin language.

The idea is completely stolen from lava/matplotlib-cpp

Quick start

Linux

Initialize venv:

PY_VER=3.10 make python

Source venv:

source venv3.10/bin/activate

Compile and run sample:

PY_VER=3.10 make all
PY_VER=3.10 make animation
./build/bin/animation

Windows (MSVC)

Initialize venv:

&"C:\Program Files\Python313\python.exe" -m venv venv313

Source venv and install requirements:

.\venv313\Scripts\Activate.ps1
pip install -r .\requirements\requirements3.13.txt

Set PYTHONPATH:

$env:PYTHONPATH = "venv313\Lib\site-packages"

Adjust make_msvc.bat file by setting PY_VER to the required version, for example SET PY_VER=313.

Build and run example:

.\make_msvc.bat build_dirs
.\make_msvc.bat build
.\make_msvc.bat bar
.\build\bin\bar.exe

References: