Usage from Python
Install the pluot Python package from PyPI.
pip install pluotStatic plotting
Section titled “Static plotting”Use the render_to_array and render_to_image functions to render static plots in raster format.
The former returns a Numpy array, while the latter returns a PIL.Image object.
When used in a Jupyter notebook, the returned PIL.Image object will be displayed as an image output of the notebook cell.
Async runtime
Section titled “Async runtime”Since the plotting function is async, it must be called from a Python async runtime.
Code executed in Jupyter notebooks is already running in an async runtime, so await render_to_image will "just work".
However, in other contexts, be careful to ensure render_to_image is await-ed within an async runtime.
For instance, to use within a REPL, run python -m asyncio.