Merging PR_218 openai_rev package with new streamlit chat app
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
"""
|
||||
Violin Plot
|
||||
-----------
|
||||
This example shows how to make a Violin Plot using Altair's density transform.
|
||||
"""
|
||||
# category: other charts
|
||||
import altair as alt
|
||||
from vega_datasets import data
|
||||
|
||||
alt.Chart(data.cars()).transform_density(
|
||||
'Miles_per_Gallon',
|
||||
as_=['Miles_per_Gallon', 'density'],
|
||||
extent=[5, 50],
|
||||
groupby=['Origin']
|
||||
).mark_area(orient='horizontal').encode(
|
||||
y='Miles_per_Gallon:Q',
|
||||
color='Origin:N',
|
||||
x=alt.X(
|
||||
'density:Q',
|
||||
stack='center',
|
||||
impute=None,
|
||||
title=None,
|
||||
axis=alt.Axis(labels=False, values=[0],grid=False, ticks=True),
|
||||
),
|
||||
column=alt.Column(
|
||||
'Origin:N',
|
||||
header=alt.Header(
|
||||
titleOrient='bottom',
|
||||
labelOrient='bottom',
|
||||
labelPadding=0,
|
||||
),
|
||||
)
|
||||
).properties(
|
||||
width=100
|
||||
).configure_facet(
|
||||
spacing=0
|
||||
).configure_view(
|
||||
stroke=None
|
||||
)
|
||||
Reference in New Issue
Block a user