Created
August 12, 2023 13:52
-
-
Save yssymmt/f0674193f63e46b64aceb07c83472901 to your computer and use it in GitHub Desktop.
This file contains 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", | |
"width": 600, | |
"height": 400, | |
"data": { | |
"format": {"type": "csv"}, | |
"url": "boxplot_dat.csv" | |
}, | |
"encoding": {"x": {"field": "変数名", "type": "nominal"}}, | |
"layer": [ | |
{ | |
"mark": {"type": "rule", "strokeWidth": 5, "color":"#a9a9a9"}, | |
"encoding": { | |
"y": {"field": "最小値", "type": "quantitative", "title": "値 (黒:平均値 | 白:中央値)"}, | |
"y2": {"field": "最大値", "type": "quantitative"} | |
} | |
}, | |
{ | |
"mark": {"type": "bar", "size": 30, "opacity": 0.5, "color":"#008b8b"}, | |
"encoding": { | |
"y": {"field": "第1四分位", "type": "quantitative"}, | |
"y2": {"field": "第3四分位"}, | |
"color": {"legend": null} | |
} | |
}, | |
{ | |
"mark": {"type": "tick", "color": "white", "size": 25}, | |
"encoding": { | |
"y": {"field": "第2四分位", "type": "quantitative"} | |
} | |
}, | |
{ | |
"mark": {"type": "tick", "color": "black", "size": 25}, | |
"encoding": { | |
"y": {"field": "平均値", "type": "quantitative"} | |
} | |
}, | |
{ | |
"mark": {"type": "tick", "color": "grey", "size": 15}, | |
"encoding": { | |
"y": {"field": "最小値", "type": "quantitative"} | |
} | |
}, | |
{ | |
"mark": {"type": "tick", "color": "grey", "size": 15}, | |
"encoding": { | |
"y": {"field": "最大値", "type": "quantitative"} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment