Skip to content

Commit 608fa7c

Browse files
authored
Merge branch 'main' into fil/brush
2 parents 7d8f326 + 8b9016a commit 608fa7c

File tree

343 files changed

+47502
-3289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+47502
-3289
lines changed

CHANGELOG-2021.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Update D3 to 7.2.1.
2424

2525
[Released December 4, 2021.](https://github.com/observablehq/plot/releases/tag/v0.3.0)
2626

27-
Plot can now produce [legends for *color* and *opacity* scales](./README.md#legends)!
27+
Plot can now produce [legends for *color* and *opacity* scales](https://observablehq.com/plot/features/legends)!
2828

29-
[<img src="./img/legend.png" width="660" alt="a scatterplot with a color legend">](https://observablehq.com/@observablehq/plot-legends)
29+
[<img src="./img/legend.png" width="660" alt="a scatterplot with a color legend">](https://observablehq.com/plot/features/legends)
3030

3131
```js
3232
Plot.plot({
@@ -41,9 +41,9 @@ Plot.plot({
4141

4242
The top-level plot *scale*.**legend** option generates an inline legend for the given *scale* (*color* or *opacity*). Alternatively, the new *plot*.legend(*name*) function returns a legend for the scale with the given *name*. The new standalone Plot.**legend**(*options*) function also allows you to create a legend independently of a chart. Two forms of color legend are provided: *swatches* for ordinal or discrete scales (*e.g.*, threshold color scales), and *ramp* for continuous scales.
4343

44-
The new [Plot.image](./README.md#image) mark centers an image on the given *xy* position.
44+
The new [Plot.image](https://observablehq.com/plot/marks/image) mark centers an image on the given *xy* position.
4545

46-
[<img src="./img/image.png" width="640" alt="a scatterplot of U.S. presidents">](https://observablehq.com/@observablehq/plot-image)
46+
[<img src="./img/image.png" width="640" alt="a scatterplot of U.S. presidents">](https://observablehq.com/plot/marks/image)
4747

4848
```js
4949
Plot.plot({
@@ -223,7 +223,7 @@ The *x1* and *x2* outputs now default to undefined if *x* is explicitly defined;
223223

224224
### Marks
225225

226-
The [*marks* option](./README.md#mark-options) now accepts render functions, null, and undefined as shorthand mark definitions. Nullish marks produce no output and are useful for conditional display (equivalent to the empty array). Render functions are invoked when plotting and may return an SVG element to insert into the plot, such as a legend or annotation.
226+
The [*marks* option](https://observablehq.com/plot/features/plots#marks-option) now accepts render functions, null, and undefined as shorthand mark definitions. Nullish marks produce no output and are useful for conditional display (equivalent to the empty array). Render functions are invoked when plotting and may return an SVG element to insert into the plot, such as a legend or annotation.
227227

228228
<img width="636" alt="a line chart of Apple, Inc.’s daily closing stock price from 2013 to 2018, with a red ‘hello world’ label" src="https://user-images.githubusercontent.com/230541/130157120-8cbf8052-aa31-44ed-a650-d081c4a21d69.png">
229229

@@ -234,7 +234,7 @@ Plot.marks(
234234
).plot()
235235
```
236236

237-
The [Plot.marks(...*marks*)](./README.md#plotmarksmarks) function provides [*mark*.plot](./README.md#plotplotoptions) shorthand for array marks. This is useful for composite marks, such as [boxes](https://github.com/observablehq/plot/blob/8fef4fa52a4cca4135f5f964e3c328ef8f18f672/test/plots/morley-boxplot.js#L18-L23).
237+
The [Plot.marks(...*marks*)](https://observablehq.com/plot/features/marks#marks) function provides [*mark*.plot](https://observablehq.com/plot/features/plots#mark_plot) shorthand for array marks. This is useful for composite marks, such as [boxes](https://github.com/observablehq/plot/blob/8fef4fa52a4cca4135f5f964e3c328ef8f18f672/test/plots/morley-boxplot.js#L18-L23).
238238

239239
All marks now support the [shapeRendering](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) option. (This is a constant; it may not vary across marks.) All marks now allow strokeWidth to be specified as a channel. (The strokeWidth channel is unscaled; values are specified in literal pixels.) Text marks now also allow stroke and strokeOpacity to be specified as channels. If its fill is not *none*, a line’s default stroke is now *none* rather than *currentColor*, making it consistent with dot and other marks. When a fill or fillOpacity channel is used with a link, or when a stroke or strokeOpacity channel is used with a rule, undefined values will now be filtered. The text mark now uses attributes instead of styles for font rendering properties, improving compatibility with Firefox.
240240

@@ -256,7 +256,7 @@ The link mark now supports *x* or *y* shorthand for one-dimensional links, equiv
256256

257257
### Scales
258258

259-
The new [*sort* options](./README.md#sort-options) allow convenient control over the order of ordinal domains, including the *fx* and *fy* facet domains. The aggregation method can be controlled via the *reduce* option, which defaults to *max*. The *reverse* and *limit* options are also supported. For example, a bar chart can be sorted by descending value like so:
259+
The new [*sort* mark option](https://observablehq.com/plot/features/scales#sort-mark-option) allows convenient control over the order of ordinal domains, including the *fx* and *fy* facet domains. The aggregation method can be controlled via the *reduce* option, which defaults to *max*. The *reverse* and *limit* options are also supported. For example, a bar chart can be sorted by descending value like so:
260260

261261
<img width="640" alt="a bar chart showing the frequency of letters in the English language in order of descending frequency, starting with E at 13% and ending with Z at almost 0%" src="https://user-images.githubusercontent.com/230541/130157414-be9cbc86-8a0c-40e7-8cfb-999881482691.png">
262262

0 commit comments

Comments
 (0)