Skip to main content

A Visualization Engine and Renderer

Project description

Avenger: A visualization engine and renderer

Avenger is an early stage prototype of a new foundational rendering library for information visualization (InfoVis) systems. Avenger defines a 2D scenegraph representation tailored to the needs of InfoVis systems. To start with, the initial application of Avenger is to serve as an alternative, GPU accelerated, rendering backend for Vega visualizations.

Try it out in Python with Vega-Altair

The avenger Python package provides a custom Altair renderer named avenger-png. This renderer relies on vl-convert to extract the vega scenegraph corresponding to a chart and then uses Avenger to render the chart to a static PNG image.

First, install altair, vega-datasets, avenger, and vl-convert-python

pip install -U altair vega_datasets avenger "vl-convert-python>=1.2.3"

Then import Altair and activate the avenger-png renderer

import altair as alt
alt.renderers.enable('avenger-png', scale=1)

Then create and display an Altair chart as usual:

import altair as alt
from vega_datasets import data

source = data.cars()

chart = alt.Chart(source).mark_circle(size=60).encode(
    x='Horsepower',
    y='Miles_per_Gallon',
    color='Origin',
)
chart

cars_scatter

Or, convert the chart to a PNG rendered by Avenger:

import avenger
png = avenger.altair_utils.chart_to_png(chart, scale=1)
with open("scatter.png", "wb") as f:
    f.write(png)

Comparison to vl-convert

There aren't currently many advantages to using Avenger to render Altar charts to PNG as compared with vl-convert, which performs rendering using resvg. Performance is generally comparable, though Avenger can be a bit faster for charts with a large number of symbol instances.

One advantage is that Avenger's text rendering support is based on COSMIC Text, which supports emoji (unlike resvg's text handling). For example, here is the result of rendering the emoji example from https://altair-viz.github.io/gallery/isotype_emoji.html using Avenger:

isotype_emoji

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

avenger-0.0.4.tar.gz (115.5 kB view details)

Uploaded Source

Built Distributions

avenger-0.0.4-cp38-abi3-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.8+ Windows x86-64

avenger-0.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

avenger-0.0.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.0 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

avenger-0.0.4-cp38-abi3-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

avenger-0.0.4-cp38-abi3-macosx_10_12_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file avenger-0.0.4.tar.gz.

File metadata

  • Download URL: avenger-0.0.4.tar.gz
  • Upload date:
  • Size: 115.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for avenger-0.0.4.tar.gz
Algorithm Hash digest
SHA256 3e9168faac9f37ee29ec4f2c400963c291a74d27e08dc2cf6f734e804fc840ea
MD5 14be7f7da22844cd58275cde7faca228
BLAKE2b-256 6a10e0ee2ddae1821177e64a4060262da1156a9cb11feaeef5b41c66a072db54

See more details on using hashes here.

File details

Details for the file avenger-0.0.4-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: avenger-0.0.4-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for avenger-0.0.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 55d9b79bb8115fe2aee7c87320c61b74f9ebe75f7e54bec1fb642c8933e80264
MD5 29d54cd9bb7efb813bd4dc79f86c0ce8
BLAKE2b-256 969eb3010eed78fea18d9728cac0598627c5175550e7909a4a9f2a5d7297cc17

See more details on using hashes here.

File details

Details for the file avenger-0.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for avenger-0.0.4-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91e8eac44e96955b7faed09b8f9c8787143b148d90e89b3731fc0eb9b573bee8
MD5 4e794f74cb43885b88dbb06223887f1b
BLAKE2b-256 0d7e1f8ebae6f0f3312c73a9f25ee6189e9c75ccfa5620936590a79b45f25f61

See more details on using hashes here.

File details

Details for the file avenger-0.0.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for avenger-0.0.4-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 024afeb0cfecc415fffbfdac42031a8116fdc1ec352d60c02c481b3772366a10
MD5 e0f172a1db1c7c130b54d04b80ecfad9
BLAKE2b-256 10179b38df4b2de0fbb18a3225ce008818863919ead131128d4a5f8ef89ce35d

See more details on using hashes here.

File details

Details for the file avenger-0.0.4-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for avenger-0.0.4-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 921f66c1cd566fb258ca1b0eac2586f8d2b2ae5ef4f77a3f6018882819e47efa
MD5 4978a22f20838625462d222b186d1a25
BLAKE2b-256 7f2e799b0d717bdb732cebe20692c146a7c74865bd524578b7eb1e0850210ad2

See more details on using hashes here.

File details

Details for the file avenger-0.0.4-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for avenger-0.0.4-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 088ce10202a1f8c20286ff7451f4dc1f46e26459360c2d1e30a5669549fbc960
MD5 ba3a17ccbee8ce79704918b371086f33
BLAKE2b-256 ce1e615bfb582b69bf7950a251afc32792274ec12aef7dbb117c9e7324da4936

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page