@@ -0,0 +1,766 @@
+%22%22%22%0ASelection Histogram%0A===================%0AThis chart shows an example of using an interval selection to filter the%0Acontents of an attached histogram, allowing the user to see the proportion%0Aof items in each category within the selection.%0A%22%22%22%0A# category: interactive%0A%0Aimport altair as alt%0Afrom vega_datasets import data%0A%0Acars = data.cars.url%0A%0Abrush = alt.selection(type='interval')%0A%0Apoints = alt.Chart().mark_point().encode(%0A    x='Horsepower:Q',%0A    y='Miles_per_Gallon:Q',%0A    color=alt.condition(brush, 'Origin:N', alt.value('lightgray'))%0A).properties(%0A    selection=brush%0A)%0A%0Abars = alt.Chart().mark_bar().encode(%0A    y='Origin:N',%0A    color='Origin:N',%0A    x='count(Origin):Q'%0A).transform_filter(%0A    brush.ref()%0A)%0A%0Achart = alt.vconcat(points, bars, data=cars)%0A

add selection histogram example