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.5.tar.gz (115.4 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8+ Windows x86-64

avenger-0.0.5-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.5-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.5-cp38-abi3-macosx_11_0_arm64.whl (3.4 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

avenger-0.0.5-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.5.tar.gz.

File metadata

  • Download URL: avenger-0.0.5.tar.gz
  • Upload date:
  • Size: 115.4 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.5.tar.gz
Algorithm Hash digest
SHA256 8a63176230ead8e27803aa2d4da9d3d2210cefba3f5865d54e820d6a59d4d433
MD5 9fc9347359af7a01a90c6504915eee04
BLAKE2b-256 5ccd058974c81fc30068b8a7cd41985b8951df2f73282dcdbf9109ee78e5b832

See more details on using hashes here.

File details

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

File metadata

  • Download URL: avenger-0.0.5-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.5-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 81cc190511ce85134652f3f2ea34a3b9570748ce804015e1815adff279e138e7
MD5 84dc8257715b004e993f9d2b2ef13a31
BLAKE2b-256 9873dc2ca3c463c5c5149eac291aba19883378bfcec931b71fd3d919c3869d5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.5-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e2285ed99d42ec3df802da2b9859850ea63a7c28f3614c22c3de68b70aed3e17
MD5 48d45fe6a3a8cfd68446e58a8f36816a
BLAKE2b-256 bebe2f39434140ae2cd7ba313a006e115399928b35e01eb8ff354b121bfcff43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.5-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 16d18fd7776d6ff98a970af2107cc789d10d7c6b63bb653e15ddfe5ca5024d15
MD5 cf238b935058ceca97fa6b75baf611b7
BLAKE2b-256 384d778396b6afb05cf60b6c8bc3b35a21dfb843f0910b12c9ff4dd28f118777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.5-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f730107e77c450069a8a61157405d0e3a4fd123a3fc45222e7e01bda8aa5c05
MD5 aa269708b51bc8afcfc6d66f31798cbf
BLAKE2b-256 42bbb6b57547a3df4c8b7749170ed6a468701264e8814b1063c38f168c6d2ef5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.5-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b58b8e73f753998abdb477cbdb636b59a4db9358d042664d3e6edd49572694ec
MD5 0ef1d78499da54179bc49f6a33af84b5
BLAKE2b-256 5fa4b9150ee1a6b7ecfa8913b688b5e427c1569ba66ca93787fccc11008c282c

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