Skip to content
Discussion options

You must be logged in to vote

My current way to do it, is via vl-convert

```{python}
#| echo: false
import altair as alt
import vl_convert as vlc
from IPython.display import Image
from vega_datasets import data

cars = data.cars()

chart=alt.Chart(cars).mark_point().encode(
    x='Horsepower',
    y='Miles_per_Gallon',
    color='Origin',
).properties(
    width=700,
    height=300
)

png_data = vlc.vegalite_to_png(chart.to_json(), vl_version="4.17", scale=1)

Image(png_data, retina=True)
```

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@s1lvester
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by aborruso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants