flex_title = "Altair"
flex_source_code = "https://github.com/danielfrg/jupyter-flex/blob/master/examples/plots/altair-simple.ipynb"
import altair as alt
from vega_datasets import data
alt.renderers.set_embed_options(actions=False)
source = data.cars()
plot = alt.Chart(source).mark_circle(size=60).encode(
x='Horsepower',
y='Miles_per_Gallon',
color='Origin',
tooltip=['Name', 'Origin', 'Horsepower', 'Miles_per_Gallon']
)
plot
plot.properties(
width='container',
height='container'
).interactive()