Skip to content

Commit 98f3f24

Browse files
committed
fix tests
1 parent 7be6157 commit 98f3f24

File tree

6 files changed

+58
-26
lines changed

6 files changed

+58
-26
lines changed

test/output/hexbinSymbol.html

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
margin-left: 0px;
1212
}
1313

14+
.plot-title {
15+
font-weight: bold;
16+
display: block;
17+
margin-bottom: 0.4em;
18+
}
19+
1420
.plot-swatch>svg {
1521
width: var(--swatchWidth);
1622
height: var(--swatchHeight);
@@ -23,9 +29,9 @@
2329
stroke-opacity: 1;
2430
}
2531

26-
.plot {
32+
.plot-palette {
2733
display: flex;
28-
align-items: center;
34+
align-items: flex-start;
2935
min-height: 33px;
3036
flex-wrap: wrap;
3137
}
@@ -35,13 +41,14 @@
3541
align-items: center;
3642
margin-right: 1em;
3743
}
38-
</style><span class="plot-swatch"><svg viewBox="-8 -8 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
39-
<path d="M4.5,0A4.5,4.5,0,1,1,-4.5,0A4.5,4.5,0,1,1,4.5,0"></path>
40-
</svg>FEMALE</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
41-
<path d="M-6.873088769818877,0L6.873088769818877,0M0,6.873088769818877L0,-6.873088769818877"></path>
42-
</svg>MALE</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
43-
<path d="M-4.869970345289333,-4.869970345289333L4.869970345289333,4.869970345289333M-4.869970345289333,4.869970345289333L4.869970345289333,-4.869970345289333"></path>
44-
</svg>null</span>
44+
</style>
45+
<div class="plot-palette"><span class="plot-swatch"><svg viewBox="-8 -8 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
46+
<path d="M4.5,0A4.5,4.5,0,1,1,-4.5,0A4.5,4.5,0,1,1,4.5,0"></path>
47+
</svg>FEMALE</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
48+
<path d="M-6.873088769818877,0L6.873088769818877,0M0,6.873088769818877L0,-6.873088769818877"></path>
49+
</svg>MALE</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
50+
<path d="M-4.869970345289333,-4.869970345289333L4.869970345289333,4.869970345289333M-4.869970345289333,4.869970345289333L4.869970345289333,-4.869970345289333"></path>
51+
</svg>null</span></div>
4552
</div><svg class="plot-2" fill="currentColor" font-family="system-ui, sans-serif" font-size="10" text-anchor="middle" width="640" height="400" viewBox="0 0 640 400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4653
<style>
4754
.plot-2 {

test/output/hexbinZ.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
margin-left: 0px;
1212
}
1313

14+
.plot-title {
15+
font-weight: bold;
16+
display: block;
17+
margin-bottom: 0.4em;
18+
}
19+
1420
.plot-swatch::before {
1521
content: "";
1622
width: var(--swatchWidth);
@@ -19,9 +25,9 @@
1925
background: var(--color);
2026
}
2127

22-
.plot {
28+
.plot-palette {
2329
display: flex;
24-
align-items: center;
30+
align-items: flex-start;
2531
min-height: 33px;
2632
flex-wrap: wrap;
2733
}
@@ -31,7 +37,8 @@
3137
align-items: center;
3238
margin-right: 1em;
3339
}
34-
</style><span class="plot-swatch" style="--color: #4e79a7;">Adelie</span><span class="plot-swatch" style="--color: #f28e2c;">Chinstrap</span><span class="plot-swatch" style="--color: #e15759;">Gentoo</span>
40+
</style>
41+
<div class="plot-palette"><span class="plot-swatch" style="--color: #4e79a7;">Adelie</span><span class="plot-swatch" style="--color: #f28e2c;">Chinstrap</span><span class="plot-swatch" style="--color: #e15759;">Gentoo</span></div>
3542
</div><svg class="plot-2" fill="currentColor" font-family="system-ui, sans-serif" font-size="10" text-anchor="middle" width="640" height="400" viewBox="0 0 640 400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3643
<style>
3744
.plot-2 {

test/output/penguinFacetDodgeIsland.html

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
margin-left: 0px;
1212
}
1313

14+
.plot-title {
15+
font-weight: bold;
16+
display: block;
17+
margin-bottom: 0.4em;
18+
}
19+
1420
.plot-swatch::before {
1521
content: "";
1622
width: var(--swatchWidth);
@@ -19,9 +25,9 @@
1925
background: var(--color);
2026
}
2127

22-
.plot {
28+
.plot-palette {
2329
display: flex;
24-
align-items: center;
30+
align-items: flex-start;
2531
min-height: 33px;
2632
flex-wrap: wrap;
2733
}
@@ -31,7 +37,9 @@
3137
align-items: center;
3238
margin-right: 1em;
3339
}
34-
</style><span class="plot-swatch" style="--color: #4e79a7;">Biscoe</span><span class="plot-swatch" style="--color: #f28e2c;">Dream</span><span class="plot-swatch" style="--color: #e15759;">Torgersen</span>
40+
</style>
41+
<div class="plot-title">island</div>
42+
<div class="plot-palette"><span class="plot-swatch" style="--color: #4e79a7;">Biscoe</span><span class="plot-swatch" style="--color: #f28e2c;">Dream</span><span class="plot-swatch" style="--color: #e15759;">Torgersen</span></div>
3543
</div><svg class="plot-2" fill="currentColor" font-family="system-ui, sans-serif" font-size="10" text-anchor="middle" width="640" height="300" viewBox="0 0 640 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3644
<style>
3745
.plot-2 {

test/output/penguinFacetDodgeSymbol.html

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
margin-left: 0px;
1212
}
1313

14+
.plot-title {
15+
font-weight: bold;
16+
display: block;
17+
margin-bottom: 0.4em;
18+
}
19+
1420
.plot-swatch>svg {
1521
width: var(--swatchWidth);
1622
height: var(--swatchHeight);
@@ -23,9 +29,9 @@
2329
stroke-opacity: 1;
2430
}
2531

26-
.plot {
32+
.plot-palette {
2733
display: flex;
28-
align-items: center;
34+
align-items: flex-start;
2935
min-height: 33px;
3036
flex-wrap: wrap;
3137
}
@@ -35,13 +41,15 @@
3541
align-items: center;
3642
margin-right: 1em;
3743
}
38-
</style><span class="plot-swatch"><svg viewBox="-8 -8 16 16" stroke="#4e79a7" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
39-
<path d="M4.5,0A4.5,4.5,0,1,1,-4.5,0A4.5,4.5,0,1,1,4.5,0"></path>
40-
</svg>Adelie</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" stroke="#f28e2c" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
41-
<path d="M-6.873088769818877,0L6.873088769818877,0M0,6.873088769818877L0,-6.873088769818877"></path>
42-
</svg>Chinstrap</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" stroke="#e15759" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
43-
<path d="M-4.869970345289333,-4.869970345289333L4.869970345289333,4.869970345289333M-4.869970345289333,4.869970345289333L4.869970345289333,-4.869970345289333"></path>
44-
</svg>Gentoo</span>
44+
</style>
45+
<div class="plot-title">species</div>
46+
<div class="plot-palette"><span class="plot-swatch"><svg viewBox="-8 -8 16 16" stroke="#4e79a7" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
47+
<path d="M4.5,0A4.5,4.5,0,1,1,-4.5,0A4.5,4.5,0,1,1,4.5,0"></path>
48+
</svg>Adelie</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" stroke="#f28e2c" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
49+
<path d="M-6.873088769818877,0L6.873088769818877,0M0,6.873088769818877L0,-6.873088769818877"></path>
50+
</svg>Chinstrap</span><span class="plot-swatch"><svg viewBox="-8 -8 16 16" stroke="#e15759" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
51+
<path d="M-4.869970345289333,-4.869970345289333L4.869970345289333,4.869970345289333M-4.869970345289333,4.869970345289333L4.869970345289333,-4.869970345289333"></path>
52+
</svg>Gentoo</span></div>
4553
</div><svg class="plot-2" fill="currentColor" font-family="system-ui, sans-serif" font-size="10" text-anchor="middle" width="640" height="400" viewBox="0 0 640 400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
4654
<style>
4755
.plot-2 {

test/plots/hexbin-symbol.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default async function() {
66
return Plot.plot({
77
grid: true,
88
symbol: {
9-
legend: true
9+
legend: true,
10+
label: null
1011
},
1112
marks: [
1213
Plot.dot(penguins, Plot.hexbin({r: "count"}, {symbol: "sex", x: "culmen_depth_mm", y: "culmen_length_mm"}))

test/plots/hexbin-z.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default async function() {
66
return Plot.plot({
77
inset: 10,
88
color: {
9-
legend: true
9+
legend: true,
10+
label: null
1011
},
1112
marks: [
1213
Plot.hexgrid(),

0 commit comments

Comments
 (0)