Skip to content

Commit da90c34

Browse files
authored
link new chart examples to forkable notebooks (#2123)
1 parent 4324fa0 commit da90c34

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

docs/marks/rect.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ To round corners, use the **r** option. If the combined corner radii exceed the
196196
</label>
197197
</p>
198198

199-
:::plot hidden defer
199+
:::plot hidden defer https://observablehq.com/@observablehq/plot-rounded-rects
200200
```js
201201
Plot.plot({
202202
marks: [
@@ -218,7 +218,7 @@ Plot.plot({
218218

219219
To round corners on a specific side, use the **rx1**, **ry1**, **rx2**, or **ry2** options. When stacking rounded rects vertically, use a positive **ry2** and a corresponding negative **ry1**; likewise for stacking rounded rects horizontally, use a positive **rx2** and a negative **rx1**. Use the **clip** option to hide the “wings” below zero.
220220

221-
:::plot defer
221+
:::plot defer https://observablehq.com/@observablehq/plot-rounded-rects
222222
```js
223223
Plot.plot({
224224
color: {legend: true},
@@ -232,7 +232,7 @@ Plot.plot({
232232

233233
You can even round specific corners using the **rx1y1**, **rx2y1**, **rx2y2**, and **rx1y2** options.
234234

235-
:::plot defer
235+
:::plot defer https://observablehq.com/@observablehq/plot-rounded-rects
236236
```js
237237
Plot.plot({
238238
color: {legend: true},

docs/marks/waffle.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ onMounted(() => {
2929

3030
The **waffle mark** is similar to the [bar mark](./bar.md) in that it displays a quantity (or quantitative extent) for a given category; but unlike a bar, a waffle is subdivided into square cells that allow easier counting. Waffles are useful for reading exact quantities. How quickly can you count the pears 🍐 below? How many more apples 🍎 are there than bananas 🍌?
3131

32-
:::plot
32+
:::plot https://observablehq.com/@observablehq/plot-simple-waffle
3333
```js
3434
Plot.waffleY([212, 207, 315, 11], {x: ["apples", "bananas", "oranges", "pears"]}).plot({height: 420})
3535
```
3636
:::
3737

3838
The waffle mark is often used with the [group transform](../transforms/group.md) to compute counts. The chart below compares the number of female and male athletes in the 2012 Olympics.
3939

40-
:::plot
40+
:::plot https://observablehq.com/@observablehq/plot-waffle-group
4141
```js
4242
Plot.waffleY(olympians, Plot.groupX({y: "count"}, {x: "sex"})).plot({x: {label: null}})
4343
```
@@ -62,7 +62,7 @@ The **unit** option determines the quantity each waffle cell represents; it defa
6262
</span>
6363
</p>
6464

65-
:::plot
65+
:::plot https://observablehq.com/@observablehq/plot-waffle-unit
6666
```js
6767
Plot.waffleY(olympians, Plot.groupZ({y: "count"}, {fx: "date_of_birth", unit})).plot({fx: {interval: "5 years", label: null}})
6868
```
@@ -76,15 +76,15 @@ While waffles typically represent integer quantities, say to count people or day
7676

7777
Like bars, waffles can be [stacked](../transforms/stack.md), and implicitly apply the stack transform when only a single quantitative channel is supplied.
7878

79-
:::plot
79+
:::plot https://observablehq.com/@observablehq/plot-stacked-waffles
8080
```js
8181
Plot.waffleY(olympians, Plot.groupZ({y: "count"}, {fill: "sex", sort: "sex", fx: "weight", unit: 10})).plot({fx: {interval: 10}, color: {legend: true}})
8282
```
8383
:::
8484

8585
Waffles can also be used to highlight a proportion of the whole. The chart below recreates a graphic of survey responses from [“Teens in Syria”](https://www.economist.com/graphic-detail/2015/08/19/teens-in-syria) by _The Economist_ (August 19, 2015); positive responses are in orange, while negative responses are in gray. The **rx** option is used to produce circles instead of squares.
8686

87-
:::plot
87+
:::plot https://observablehq.com/@observablehq/plot-survey-waffle
8888
```js
8989
Plot.plot({
9090
axis: null,

0 commit comments

Comments
 (0)