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

Uploaded Source

Built Distributions

avenger-0.0.3-cp38-abi3-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.8+ Windows x86-64

avenger-0.0.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB view details)

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

avenger-0.0.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.8 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

avenger-0.0.3-cp38-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

avenger-0.0.3-cp38-abi3-macosx_10_12_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: avenger-0.0.3.tar.gz
  • Upload date:
  • Size: 108.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for avenger-0.0.3.tar.gz
Algorithm Hash digest
SHA256 accdac567b6c7501f0265fa869af6bb5e8351a50ead0da1877ecb3c6ecc3d274
MD5 cd9ba17e5626aa85add6c0eba1d11dc2
BLAKE2b-256 b5a2e0ca06d2ba2920861cf9ef70db490199a7181dfc133b01420a35e705ac70

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for avenger-0.0.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 aa499ee23f311a0970ddacedbc41184a3614b98a72d15320346af11934661dd6
MD5 5ac733793ad8b11e8b440e7c78957e46
BLAKE2b-256 7f9e438b20936e07c4585b4138528c150bef9d72f83031826fa976ef45d4ec70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c5eaa9eee195f543cdb06cf653bec3b308b32f8fda7d7d72f13ae727ee10d1d
MD5 a9a8e3965e0228583d879c02cd476689
BLAKE2b-256 12c8b95f1c86b1b7b7f01cb3eeac877f3ba699a68dc0cb5fbf1647f9e88a8b90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5ac42cbda0ea1af0d41658f70ef660bbadaabd391661349c4b377e3f7aa42a8c
MD5 13789ca3c7fe66531ad5a6e6e3409a9c
BLAKE2b-256 a0498032df6e0a825dbe9991c641c617adc25a337c294e643619edee8aabdbff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bfe761c35c5c87e3a59b411a4f199739eb24b6339693bf5f8245839a43f73a5b
MD5 c3a21fe2167c9c4789b49cb740b358bb
BLAKE2b-256 7e8c5a28c212c3a3dfe14ae13649cb494bd38c1dab6e7d5b883f039850cd8be6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for avenger-0.0.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a7e4599ea0f77ca5d08c920b22e15776b563f10edab3cbf8019264cb37b0915e
MD5 f4191f4d59052e41c33bc4a90ad29230
BLAKE2b-256 5539e2dee31e92037098245e64eda234ba1c6850a2fe42f494bde19d373441f6

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