Vega widget for trame
Project description
trame-vega extend trame widgets with a Figure component that is capable of rendering Vega grammars such as Altair plots.
Installing
trame-vega can be installed with pip:
pip install --upgrade trame-vega
Usage
The Trame Tutorial is the place to go to learn how to use the library and start building your own application.
The API Reference documentation provides API-level documentation.
License
trame-vega is made available under the BSD-3 License. For more details, see LICENSE This license has been chosen to match the one use by Vega and Altair which are either used within that trame widget or will be use by the user to create the content for those Figures.
Community
Trame | Discussions | Issues | RoadMap | Contact Us
Enjoying trame?
Share your experience with a testimonial or with a brand approval.
Example: Vega + Altair
The Python interface of Altair provide examples on how to create various visualization.
import altair as alt
from vega_datasets import data
from trame.widgets import vega
# Generate chart
source = data.cars()
fig = (
alt.Chart(source)
.mark_circle()
.encode(
alt.X(alt.repeat("column"), type="quantitative"),
alt.Y(alt.repeat("row"), type="quantitative"),
color="Origin:N",
)
.properties(width=200, height=200)
.repeat(
row=["Horsepower", "Acceleration", "Miles_per_Gallon"],
column=["Miles_per_Gallon", "Acceleration", "Horsepower"],
)
.interactive()
)
# Display it
widget = vega.Figure(figure=None) # could pass fig at construction
widget.update(fig) # or update later
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for trame_vega-2.0.0rc5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6b2498763d30d2d1f02e28d16c7b675bc7b29e7f4fb589056c068640532a732 |
|
MD5 | 7350ecadc6a023f93676ce4b93fbcc15 |
|
BLAKE2b-256 | 4f9708aa9a6a91a0c9bd1b7f38d09f66b6ec278d431686a650d270de8ea02c61 |