Created
November 22, 2023 10:18
-
-
Save keckelt/10e485dfd83c67b48cbd2aa2991982a5 to your computer and use it in GitHub Desktop.
Vega Lite Fill and Stroke Encoding
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"description": "A scatterplot showing body mass and flipper lengths of penguins.", | |
"data": {"url": "data/penguins.json"}, | |
"transform": [{"sample": 30}], | |
"mark": "point", | |
"encoding": { | |
"x": { | |
"field": "Flipper Length (mm)", | |
"type": "quantitative", | |
"scale": {"zero": false} | |
}, | |
"y": { | |
"field": "Body Mass (g)", | |
"type": "quantitative", | |
"scale": {"zero": false} | |
}, | |
"strokeWidth": {"value": 4}, | |
"stroke": {"field": "Species", "type": "nominal"}, | |
"fill": { | |
"field": "Flipper Length (mm)", | |
"type": "quantitative", | |
"scale": {"scheme": "greys"} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment