mirror of
https://github.com/aykhans/AzSuicideDataVisualization.git
synced 2025-09-06 02:44:18 +00:00
18 lines
445 B
Python
18 lines
445 B
Python
"""
|
|
Multifeature Scatter Plot
|
|
=========================
|
|
This example shows how to make a scatter plot with multiple feature encodings.
|
|
"""
|
|
# category: scatter plots
|
|
import altair as alt
|
|
from vega_datasets import data
|
|
|
|
source = data.iris()
|
|
|
|
alt.Chart(source).mark_circle().encode(
|
|
alt.X('sepalLength', scale=alt.Scale(zero=False)),
|
|
alt.Y('sepalWidth', scale=alt.Scale(zero=False, padding=1)),
|
|
color='species',
|
|
size='petalWidth'
|
|
)
|