Skip to content

Commit 3749b6d

Browse files
committed
Update README
1 parent 4070805 commit 3749b6d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Plot automatically generates axes for position scales. You can configure these a
236236
* *scale*.**labelAnchor** - the label anchor: *top*, *right*, *bottom*, *left*, or *center*
237237
* *scale*.**labelOffset** - the label position offset (in pixels; default 0, typically for facet axes)
238238

239-
Plot does not currently generate a legend for the *color*, *radius*, or *opacity* scales, but when it does, we expect that some of the above options will also be used to configure legends. Top-level options are also supported as shorthand: **grid** (for *x* and *y* only; see [facet.grid](#facets)), **inset**, **round**, **align**, and **padding**.
239+
Plot does not currently generate a legend for the *color*, *radius*, or *opacity* scales, but when it does, we expect that some of the above options will also be used to configure legends. Top-level options are also supported as shorthand: **grid** (for *x* and *y* only; see [facet.grid](#facet-options)), **inset**, **round**, **align**, and **padding**.
240240

241241
### Color options
242242

@@ -349,11 +349,9 @@ Plot.plot({
349349
})
350350
```
351351

352-
## Facets
352+
### Facet options
353353

354-
[<img src="./img/frame.png" width="320" height="198" alt="a faceted scatterplot with a frame around each facet">](https://observablehq.com/@data-workflows/plot-facets)
355-
356-
The *facet* option enables faceting. When faceting, two additional band scales may be configured:
354+
The *facet* option enables [faceting](https://observablehq.com/@data-workflows/plot-facets). When faceting, two additional band scales may be configured:
357355

358356
* **fx** - horizontal position
359357
* **fy** - vertical position
@@ -379,15 +377,15 @@ Plot.plot({
379377
},
380378
marks: {
381379
Plot.frame(), // draws a outline around each facet
382-
Plot.dot(penguins.slice(), {fill: "grey", x:}), // draws all penguins on each facet
383-
Plot.dot(penguins, {fill: "blue", x: …}), // draws only the current facet’s subset
380+
Plot.dot(penguins.slice(), {x: "culmen_length_mm", y: "culmen_depth_mm", fill: "#eee"}), // draws all penguins on each facet
381+
Plot.dot(penguins, {x: "culmen_length_mm", y: "culmen_depth_mm"}) // draws only the current facet’s subset
384382
}
385383
})
386384
```
387385

388386
## Marks
389387

390-
Marks visualize data as geometric shapes such as bars, dots, and lines. An single mark can generate multiple shapes: for example, passing a [Plot.barY](#plotbarydata-options) to [Plot.plot](#plotplotoptions) will produce a bar for each element in the associated data. Multiple marks can be layered into plots.
388+
[Marks](https://observablehq.com/@data-workflows/plot-marks) visualize data as geometric shapes such as bars, dots, and lines. An single mark can generate multiple shapes: for example, passing a [Plot.barY](#plotbarydata-options) to [Plot.plot](#plotplotoptions) will produce a bar for each element in the associated data. Multiple marks can be layered into plots.
391389

392390
Mark constructors take two arguments: **data** and **options**. Together, the *data* and *options* describe a tabular dataset and how to visualize it. Options that are shared by all of a mark’s generated shapes are known as *constants*, while options that vary with the mark’s data are known as *channels*. Channels are typically specified as abstract values such as time or temperature rather than visual values such as position or color because most channels are bound to [scales](#scale-options).
393391

0 commit comments

Comments
 (0)