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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8+ Windows x86-64

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

Uploaded CPython 3.8+ macOS 11.0+ ARM64

avenger-0.0.6-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.6.tar.gz.

File metadata

  • Download URL: avenger-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 6042687075ac60b0275da60aaeee217e6a1f067357d4ac688e4b9541954b9ab0
MD5 3daaed4a6904ca5e49d17489f3bc2389
BLAKE2b-256 7725ecd87513db0b1a73352197611afd2be275e6125d9ce1b358cd31ed348977

See more details on using hashes here.

File details

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

File metadata

  • Download URL: avenger-0.0.6-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.6-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e743ae61f80d2eceba3680467a2e5e8b7940d9057f4a9439661a8579bd9da89
MD5 a8c14fbbb815163d6c5157c18b1c8c59
BLAKE2b-256 8de2db1951fcc2f1c1551d0ee2a74348297375112ec3f163a1da94c3603647ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f327085b01dec1406b01835b126702f54b8ee9283bb66f56f678c55a1d85416
MD5 f413d98cababddc38d14e7d190e2a38d
BLAKE2b-256 851741d77280c06cd9b0e3949c39c071e136368e899c8933acebc8cfb6cb4dd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 20143332a16c2975c9f67e8c27fe0441745de5134fd8098032647fa9446db68c
MD5 41020eabd6f57d30aadb4aab6e7b3a8c
BLAKE2b-256 2b366ba0684e460fb6182cabe9761c3724adec3edc5178be6f8032cde7c79f45

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.6-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 547a2d036f703512cfa4b74ea135e952d57f559228c20dfa0c285ec31a730f0f
MD5 78869f4baa7514804b39e14a51be73b9
BLAKE2b-256 adea81d37e82347d16d2682197c2bfc8b06bc39ec0a5af67c9d51a8b9e5512a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.6-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9f5383e01ac9bf4bfa4bf3e7b2d363d1f7873c0ac101d7619849a61c5fa4bc70
MD5 78f0895e61e3c2c8a3fb31b6edec5682
BLAKE2b-256 0bf42ef499b741c82f9df3b2356e8924e2cf9914ddafa23044cec0dee950d43c

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