Repository navigation
Expand file tree
/
Copy pathdemo.html
More file actions
56 lines (50 loc) · 2.64 KB
/
Copy pathdemo.html
File metadata and controls
56 lines (50 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="ja" data-theme="default">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>m-boxplot の見本</title>
<!-- 組み方:node kit/build.mjs components/boxplot/demo.html -o components/boxplot/out/demo.html(記録はすべて架空) -->
<style>
</style>
</head>
<body>
<div id="stage">
<section class="slide">
<h2>箱ひげ図のかき方:1 か月に読んだ本(架空の 11 人)</h2>
<div class="body">
<m-boxplot xl="冊数(冊)" xr="[0,20]" xt="[0,2,4,6,8,10,12,14,16,18,20]" style="height:440px">
<script type="application/json">{"groups": [{"values": [12, 5, 9, 18, 7, 3, 13, 8, 15, 6, 10]}]}</script>
</m-boxplot>
</div>
<div class="concl"><span>→ 小さい順に並べ、中央値と前半・後半の中央値(四分位数)で箱にする</span></div>
</section>
<section class="slide">
<h2>3 つの組の数学の得点(架空の各 15 人)</h2>
<div class="body">
<m-boxplot orient="v" build="whole" dots="on" outliers="on" yl="得点(点)" yr="[30,100]" yt="[30,40,50,60,70,80,90,100]" style="height:440px">
<script type="application/json">{"groups": [
{"label": "A 組", "values": [42, 48, 51, 55, 57, 58, 60, 61, 63, 64, 66, 68, 70, 72, 75]},
{"label": "B 組", "values": [50, 56, 60, 62, 65, 67, 68, 70, 71, 73, 74, 76, 79, 82, 99]},
{"label": "C 組", "values": [35, 45, 52, 54, 58, 60, 61, 62, 64, 66, 67, 69, 71, 73, 80]}]}</script>
</m-boxplot>
</div>
<div class="concl"><span>→ B 組は箱が高い。99 点は 1.5 × 四分位範囲より外の外れ値</span></div>
</section>
<section class="slide">
<h2>見せ方の種類(variant)</h2>
<div class="body">
<div style="display:grid;grid-template-columns:1fr 1fr;gap:0 36px">
<m-boxplot variant="fade" build="whole" dots="on" xl="フェード(fade、既定)" xr="[0,20]" style="height:400px">
<script type="application/json">{"groups": [{"label": "前", "values": [3, 5, 6, 7, 8, 9, 10, 12, 13, 15, 18]}, {"label": "後", "values": [6, 8, 9, 10, 11, 12, 12, 13, 14, 16, 17]}]}</script>
</m-boxplot>
<m-boxplot variant="draw" build="whole" dots="on" xl="線を引く(draw)" xr="[0,20]" style="height:400px">
<script type="application/json">{"groups": [{"label": "前", "values": [3, 5, 6, 7, 8, 9, 10, 12, 13, 15, 18]}, {"label": "後", "values": [6, 8, 9, 10, 11, 12, 12, 13, 14, 16, 17]}]}</script>
</m-boxplot>
</div>
</div>
<div class="concl"><span>→ 書かなければ最初の見せ方(fade)になる。値は架空</span></div>
</section>
</div>
</body>
</html>