diff --git a/CHANGELOG-2021.md b/CHANGELOG-2021.md
index f7c69507fe..f10862d703 100644
--- a/CHANGELOG-2021.md
+++ b/CHANGELOG-2021.md
@@ -172,7 +172,7 @@ Update [Observable Hypertext Literal](https://github.com/observablehq/htl) to [0
[Released September 24, 2021.](https://github.com/observablehq/plot/releases/tag/v0.2.3)
-Rect, bar, and rule marks now accept an *interval* option that allows you to derive *x1* and *x2* from *x*, or *y1* and *y2* from *y*, where appropriate. For example, using d3.utcDay as the interval creates rects that span from UTC midnight to UTC midnight, bounding the associated time instant. The interval is typically specifed as a [D3 time interval](https://github.com/d3/d3-time/blob/main/README.md), but may be any compatible object which implements *interval*.floor and *interval*.offset: *interval*.floor(*x*) returns the start of the interval *x1* for the given *x*, while *interval*.offset(*x*) returns the end of the interval *x2* for the given interval start *x*. If the interval is specified as a number *n*, *x1* and *x2* are the two consecutive multiples of *n* that bracket *x*.
+Rect, bar, and rule marks now accept an *interval* option that allows you to derive *x1* and *x2* from *x*, or *y1* and *y2* from *y*, where appropriate. For example, using d3.utcDay as the interval creates rects that span from UTC midnight to UTC midnight, bounding the associated time instant. The interval is typically specified as a [D3 time interval](https://github.com/d3/d3-time/blob/main/README.md), but may be any compatible object which implements *interval*.floor and *interval*.offset: *interval*.floor(*x*) returns the start of the interval *x1* for the given *x*, while *interval*.offset(*x*) returns the end of the interval *x2* for the given interval start *x*. If the interval is specified as a number *n*, *x1* and *x2* are the two consecutive multiples of *n* that bracket *x*.
The new Plot.normalize and Plot.window methods return map methods for use in conjunction with Plot.map. This allows greater flexibility; for example, you can apply separate window methods to *y1* and *y2* to produce Bollinger bands.
diff --git a/CHANGELOG-2022.md b/CHANGELOG-2022.md
index c3094cd61c..c763d85da4 100644
--- a/CHANGELOG-2022.md
+++ b/CHANGELOG-2022.md
@@ -367,7 +367,7 @@ Plot.plot({
})
```
-The [line](https://observablehq.com/plot/marks/line) and [area](https://observablehq.com/plot/marks/area) marks (specifically lineX, lineY, areaX, and areaY) now support an implicit [bin transform](https://observablehq.com/plot/transforms/bin) with the **interval** option. This can be used to “regularize” time series data, say to show gaps or default to zero when data is missing, rather than interpolating across missing data. This is also useful for stacking time series data that is sampled at irregular intervals or with missing samples.
+The [line](https://observablehq.com/plot/marks/line) and [area](https://observablehq.com/plot/marks/area) marks (specifically lineX, lineY, areaX, and areaY) now support an implicit [bin transform](https://observablehq.com/plot/transforms/bin) with the **interval** option. This can be used to “regularize” time series data, say to show gaps or default to zero when data is missing, rather than interpolating across missing data. This is also useful for stacking time series data that is sampled at irregular intervals or missing samples.
@@ -429,7 +429,7 @@ function Likert(
The new [_quantize_ scale type](https://observablehq.com/plot/features/scales#color-scale-options) transforms a continuous domain into discrete, evenly-spaced thresholds. The _threshold_ scale type now supports domains in descending order (in addition to ascending order), such as [20, 10, 5, 0] instead of [0, 5, 10, 20].
-
+
```js
Plot.plot({
@@ -471,7 +471,7 @@ Plot.boxX(morley, {x: "Speed", y: "Expt"}).plot({x: {grid: true, inset: 6}})
Plot.barY(d3.range(20).map(Math.random)).plot()
```
-The mark [sort option](https://observablehq.com/plot/features/scales#sort-mark-option) now supports implicit “width” and “height” channels, defined as |*x2* - *x1*| and |*y2* - *y1*| respectively. These channels are useful for sorting rects and bars by length. The *reverse* option defaults to true when sorting by these channels. When sorting by *y* and no *y* channel is available, sorting will now fallback to *y2* if available; the same fallback logic applies to *x* and *x2*. (This behavior was previously supported on marks that support implicit stacking but now applies universally to all marks.)
+The mark [sort option](https://observablehq.com/plot/features/scales#sort-mark-option) now supports implicit “width” and “height” channels, defined as |*x2* - *x1*| and |*y2* - *y1*| respectively. These channels are useful for sorting rects and bars by length. The *reverse* option defaults to true when sorting by these channels. When sorting by *y* and no *y* channel is available, sorting will now fall back to *y2* if available; the same fallback logic applies to *x* and *x2*. (This behavior was previously supported on marks that support implicit stacking but now applies universally to all marks.)
@@ -583,7 +583,7 @@ Plot.vector((T => d3.cross(T, T))(d3.ticks(0, 2 * Math.PI, 20)), {
})
```
-The [dot mark](https://observablehq.com/plot/marks/dot) now supports a *symbol* option to control the displayed shape, which defaults to *circle*. The *symbol* channel (and associated *symbol* scale) can also be used as an categorical encoding. The default symbol set is based on whether symbols are stroked or filled, improving differentiability and giving uniform weight. Plot supports all of D3’s built-in symbol types: *circle*, *cross*, *diamond*, *square*, *star*, *triangle*, and *wye* (for fill) and *circle*, *plus*, *times*, *triangle2*, *asterisk*, *square2*, and *diamond2* (for stroke, based on [Heman Robinson’s research](https://www.tandfonline.com/doi/abs/10.1080/10618600.2019.1637746)); you can also implement a [custom symbol type](https://d3js.org/d3-shape/symbol#custom-symbols).
+The [dot mark](https://observablehq.com/plot/marks/dot) now supports a *symbol* option to control the displayed shape, which defaults to *circle*. The *symbol* channel (and associated *symbol* scale) can also be used as a categorical encoding. The default symbol set is based on whether symbols are stroked or filled, improving differentiability and giving uniform weight. Plot supports all of D3’s built-in symbol types: *circle*, *cross*, *diamond*, *square*, *star*, *triangle*, and *wye* (for fill) and *circle*, *plus*, *times*, *triangle2*, *asterisk*, *square2*, and *diamond2* (for stroke, based on [Heman Robinson’s research](https://www.tandfonline.com/doi/abs/10.1080/10618600.2019.1637746)); you can also implement a [custom symbol type](https://d3js.org/d3-shape/symbol#custom-symbols).
[
](https://observablehq.com/plot/marks/dot)
diff --git a/CHANGELOG-2023.md b/CHANGELOG-2023.md
index 5ac25bfd45..fa55053e80 100644
--- a/CHANGELOG-2023.md
+++ b/CHANGELOG-2023.md
@@ -315,7 +315,7 @@ The [barycentric interpolator](https://observablehq.com/plot/marks/raster#interp
-The [tip mark](https://observablehq.com/plot/marks/tip) now automatically sets the pointer-events attribute to *none* when associated with the [pointer transform](https://observablehq.com/plot/interactions/pointer) when the the pointer is not sticky, as when hovering a chart without clicking to lock the pointer. This prevents the tip mark from interfering with interaction on other marks, such as clickable links.
+The [tip mark](https://observablehq.com/plot/marks/tip) now automatically sets the pointer-events attribute to *none* when associated with the [pointer transform](https://observablehq.com/plot/interactions/pointer) when the pointer is not sticky, as when hovering a chart without clicking to lock the pointer. This prevents the tip mark from interfering with interaction on other marks, such as clickable links.
The [auto mark](https://observablehq.com/plot/marks/auto) now renders as a cell, instead of a degenerate invisible rect, when **x** and **y** are both ordinal and the **mark** option is set to *bar*. The [tree mark](https://observablehq.com/plot/marks/tree) no longer produces duplicate tips with the **tip** option. The [rule mark](https://observablehq.com/plot/marks/rule) now respects the top-level **document** option, if any, when using the **clip** option. The [axis mark](https://observablehq.com/plot/marks/axis) now correctly handles the **sort**, **filter**, **reverse**, and **initializer** options.
@@ -697,7 +697,7 @@ Plot.plot({
The *x* and *y* axes are now automatically repeated in empty facets, improving readability by reducing eye travel to read tick values. Below, note that the *x* axis for culmen depth (with ticks at 15 and 20 mm) is rendered below the Adelie/null-sex facet in the top-right.
-[
](ttps://observablehq.com/plot/marks/axis)
+[
](https://observablehq.com/plot/marks/axis)
```js
Plot.plot({
diff --git a/CHANGELOG-2024.md b/CHANGELOG-2024.md
index bb966eab27..0b4e7fd293 100644
--- a/CHANGELOG-2024.md
+++ b/CHANGELOG-2024.md
@@ -120,7 +120,7 @@ Changes the default categorical color scheme to *Observable10*.
The group transform now preserves the input order of groups by default, making it easier to sort groups by using the **sort** option. The group and bin transforms now support the *z* reducer.
-Improves the accessibility of axes by hidding tick marks and grid lines from the accessibility tree.
+Improves the accessibility of axes by hiding tick marks and grid lines from the accessibility tree.
Upgrades D3 to 7.9.0.
diff --git a/docs/features/curves.md b/docs/features/curves.md
index a01780b4c5..4f9b39745b 100644
--- a/docs/features/curves.md
+++ b/docs/features/curves.md
@@ -67,7 +67,7 @@ The following named curve methods are supported:
* *bundle* - a straightened cubic basis spline (suitable for lines only, not areas)
* *cardinal* - a cubic cardinal spline (with one-sided differences at the ends)
* *cardinal-open* - an open cubic cardinal spline
-* *cardinal-closed* - an closed cubic cardinal spline
+* *cardinal-closed* - a closed cubic cardinal spline
* *catmull-rom* - a cubic Catmull–Rom spline (with one-sided differences at the ends)
* *catmull-rom-open* - an open cubic Catmull–Rom spline
* *catmull-rom-closed* - a closed cubic Catmull–Rom spline
diff --git a/docs/features/markers.md b/docs/features/markers.md
index 66ced34e7b..67aee75112 100644
--- a/docs/features/markers.md
+++ b/docs/features/markers.md
@@ -62,6 +62,6 @@ The following named markers are supported:
If **marker** is true, it defaults to *circle*. If **marker** is a function, it will be called with a given *color* and must return an [SVG marker element](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker).
-The primary color of a marker is inherited from the *stroke* of the associated mark. The *arrow* marker is [automatically oriented](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/orient) such that it points in the tangential direction of the path at the position the marker is placed. The *circle* markers are centered around the given vertex.
+The primary color of a marker is inherited from the *stroke* of the associated mark. The *arrow* marker is [automatically oriented](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/orient) such that it points in the tangential direction of the path at the position where the marker is placed. The *circle* markers are centered around the given vertex.
For lines whose [curve](./curves.md) is not *linear*, markers are not necessarily drawn at the data positions given by **x** and **y**; marker placement is determined by the (possibly Bézier) path segments generated by the curve. To ensure that symbols are drawn at a given **x** and **y** position, consider using a [dot mark](../marks/dot.md) instead.
diff --git a/docs/features/projections.md b/docs/features/projections.md
index 80a26e9079..234ab340bf 100644
--- a/docs/features/projections.md
+++ b/docs/features/projections.md
@@ -163,7 +163,7 @@ Plot.plot({
circle = d3.geoCircle().center([9, 34]).radius(radius)()
```
-If none of Plot’s built-in projections meet your needs, you can use any of [D3’s extended projections](https://github.com/d3/d3-geo-projection) by specifying the **projection** option as a function that returns a D3 projection. Below, a map of Antarctica in a polar aspect of the *azimuthal-equidistant* projection.
+If none of Plot’s built-in projections meet your needs, you can use any of [D3’s extended projections](https://github.com/d3/d3-geo-projection) by specifying the **projection** option as a function that returns a D3 projection. Below is a map of Antarctica in a polar aspect of the *azimuthal-equidistant* projection.
:::plot defer https://observablehq.com/@observablehq/plot-polar-projection
```js
diff --git a/docs/features/scales.md b/docs/features/scales.md
index f40894570c..c805d0ae0e 100644
--- a/docs/features/scales.md
+++ b/docs/features/scales.md
@@ -842,7 +842,7 @@ Plot.plot({
Picking a diverging color scheme name defaults the scale type to *diverging*; set the scale type to *linear* to treat the color scheme as sequential instead. Diverging color scales support a *scale*.**pivot** option, which defaults to zero. Values below the pivot will use the lower half of the color scheme (*e.g.*, reds for the *rdgy* scheme), while values above the pivot will use the upper half (grays for *rdgy*).
-The following cylical color schemes are supported:
+The following cyclical color schemes are supported:
:::plot defer hidden
```js
diff --git a/docs/marks/area.md b/docs/marks/area.md
index 1079114ef9..086e90702a 100644
--- a/docs/marks/area.md
+++ b/docs/marks/area.md
@@ -190,7 +190,7 @@ Plot.plot({
```
:::
-The **z** channel determines how data is grouped: if the **z** channel is not specified, but a varying **fill** channel is, the **fill** channel is used for **z**; the **z** channel will further fallback to a varying **stroke** channel if needed.
+The **z** channel determines how data is grouped: if the **z** channel is not specified, but a varying **fill** channel is, the **fill** channel is used for **z**; the **z** channel will further fall back to a varying **stroke** channel if needed.
The **z** channel (either implicitly or explicitly) is typically used with the [stack transform](../transforms/stack.md) for a stacked area chart or streamgraph. You can disable the implicit stack transform and produce overlapping areas by setting **y2** instead of **y**.
diff --git a/docs/marks/line.md b/docs/marks/line.md
index 398ab4cf1d..b21379f436 100644
--- a/docs/marks/line.md
+++ b/docs/marks/line.md
@@ -230,7 +230,7 @@ Plot.plot({
When using **z**, lines are drawn in input order. The [sort transform](../transforms/sort.md) above places the red lines on top of the gray ones to improve readability.
-As an alternative to **z**, you can render multiple lines using multiple marks. While more verbose, this allows you to choose different options for each line. For example, below we plot the a 14-day moving average of the daily highs and lows in temperate San Francisco using the [window transform](../transforms/window.md).
+As an alternative to **z**, you can render multiple lines using multiple marks. While more verbose, this allows you to choose different options for each line. For example, below we plot a 14-day moving average of the daily highs and lows in temperate San Francisco using the [window transform](../transforms/window.md).
:::plot defer https://observablehq.com/@observablehq/plot-moving-average-line
```js
diff --git a/docs/marks/linear-regression.md b/docs/marks/linear-regression.md
index 2c9d2d7c73..ef6330080e 100644
--- a/docs/marks/linear-regression.md
+++ b/docs/marks/linear-regression.md
@@ -73,7 +73,7 @@ Plot.plot({
```
:::
-Finally, note that regression is not a symmetric method: the model computed to express _y_ as a function of _x_ (linearRegressionY) doesn’t give the same result as the regression of _x_ as a function of _y_ (linearRegressionX) unless the points are all perfectly aligned. In the worst case, where the two variables are statistically independent, the linear regression of _y_ against _x_ is an horizontal line, whereas the linear regression of _x_ against _y_ is a vertical line.
+Finally, note that regression is not a symmetric method: the model computed to express _y_ as a function of _x_ (linearRegressionY) doesn’t give the same result as the regression of _x_ as a function of _y_ (linearRegressionX) unless the points are all perfectly aligned. In the worst case, where the two variables are statistically independent, the linear regression of _y_ against _x_ is a horizontal line, whereas the linear regression of _x_ against _y_ is a vertical line.
:::plot https://observablehq.com/@observablehq/plot-linear-regression-is-not-symmetric
```js
diff --git a/docs/marks/raster.md b/docs/marks/raster.md
index ae1c8cf11a..1d5e6b803c 100644
--- a/docs/marks/raster.md
+++ b/docs/marks/raster.md
@@ -302,7 +302,7 @@ Returns a new raster mark with the given (optional) *data* and *options*.
## Spatial interpolators
-The [raster](#raster-mark) and [contour](./contour.md) marks use **spatial interpolators** to populate a raster grid from a discrete set of (often ungridded) spatial samples. The **interpolate** option controls how these marks compute the raster grid. The following built-in methods are provided:
+The [raster](#raster-mark) and [contour](./contour.md) marks use **spatial interpolators** to populate a raster grid from a discrete set of (often gridless) spatial samples. The **interpolate** option controls how these marks compute the raster grid. The following built-in methods are provided:
* *none* (or null) - assign each sample to the containing pixel
* *nearest* - assign each pixel to the closest sample’s value (Voronoi diagram)
diff --git a/docs/transforms/filter.md b/docs/transforms/filter.md
index 09587e1f67..9ac6026d77 100644
--- a/docs/transforms/filter.md
+++ b/docs/transforms/filter.md
@@ -73,7 +73,7 @@ Plot.plot({
```
:::
-Since the filter transform only affects the mark’s index and not the channel values, it does not affect the default scale domains. Below, the *x* scale contains every English letter, even though the only the bars for the vowels are shown.
+Since the filter transform only affects the mark’s index and not the channel values, it does not affect the default scale domains. Below, the *x* scale contains every English letter, even though only the bars for the vowels are shown.
:::plot https://observablehq.com/@observablehq/plot-filtered-bars
```js
diff --git a/docs/transforms/group.md b/docs/transforms/group.md
index 8a52cf4973..c12eb24c30 100644
--- a/docs/transforms/group.md
+++ b/docs/transforms/group.md
@@ -375,7 +375,7 @@ The following named reducers are supported:
In addition, a reducer may be specified as:
* a function to be passed the array of values for each group and the extent of the group
-* an object with a **reduceIndex** method, an optionally a **scope**
+* an object with a **reduceIndex** method, and optionally a **scope**
In the last case, the **reduceIndex** method is repeatedly passed three arguments: the index for each group (an array of integers), the input channel’s array of values, and the extent of the group (an object {data, x, y}); it must then return the corresponding aggregate value for the group.
diff --git a/docs/transforms/hexbin.md b/docs/transforms/hexbin.md
index 91198eaf64..c9037d6b21 100644
--- a/docs/transforms/hexbin.md
+++ b/docs/transforms/hexbin.md
@@ -101,7 +101,7 @@ Plot
```
:::
-The hexbin transform also works with Plot’s [projection system](../features/projections.md). Below, hexagon size represents the number of nearby Walmart stores, while color represents the date the first nearby Walmart store opened. (The first Walmart opened in Rogers, Arkansas.)
+The hexbin transform also works with Plot’s [projection system](../features/projections.md). Below, hexagon size represents the number of nearby Walmart stores, while color represents the date that the first nearby Walmart store opened. (The first Walmart opened in Rogers, Arkansas.)
:::plot defer https://observablehq.com/@observablehq/plot-hexbin-map
```js
diff --git a/src/context.d.ts b/src/context.d.ts
index 53a1c01fee..59420786fb 100644
--- a/src/context.d.ts
+++ b/src/context.d.ts
@@ -18,7 +18,7 @@ export interface Context {
/** The current projection, if any. */
projection?: GeoStreamWrapper;
- /** A function to draw GeoJSON with the current projection, if any, otherwise with the x and y scales. */
+ /** A function to draw GeoJSON with the current projection, if any; otherwise, with the x and y scales. */
path: () => GeoPath;
/** The default clip for all marks. */
diff --git a/src/curve.d.ts b/src/curve.d.ts
index 69acaf77b3..d72ff1c23b 100644
--- a/src/curve.d.ts
+++ b/src/curve.d.ts
@@ -42,7 +42,7 @@ export interface CurveOptions extends CurveAutoOptions {
* * *bundle* - a straightened cubic basis spline (suitable for lines only, not areas)
* * *cardinal* - a cubic cardinal spline (with one-sided differences at the ends)
* * *cardinal-open* - an open cubic cardinal spline
- * * *cardinal-closed* - an closed cubic cardinal spline
+ * * *cardinal-closed* - a closed cubic cardinal spline
* * *catmull-rom* - a cubic Catmull–Rom spline (with one-sided differences at the ends)
* * *catmull-rom-open* - an open cubic Catmull–Rom spline
* * *catmull-rom-closed* - a closed cubic Catmull–Rom spline
@@ -76,7 +76,7 @@ export interface CurveAutoOptions {
* * *bundle* - a straightened cubic basis spline (suitable for lines only, not areas)
* * *cardinal* - a cubic cardinal spline (with one-sided differences at the ends)
* * *cardinal-open* - an open cubic cardinal spline
- * * *cardinal-closed* - an closed cubic cardinal spline
+ * * *cardinal-closed* - a closed cubic cardinal spline
* * *catmull-rom* - a cubic Catmull–Rom spline (with one-sided differences at the ends)
* * *catmull-rom-open* - an open cubic Catmull–Rom spline
* * *catmull-rom-closed* - a closed cubic Catmull–Rom spline
diff --git a/src/marks/bar.d.ts b/src/marks/bar.d.ts
index 65af451b9b..7dc92199b0 100644
--- a/src/marks/bar.d.ts
+++ b/src/marks/bar.d.ts
@@ -38,7 +38,7 @@ export interface BarXOptions extends BarOptions {
*
* If neither **x1** nor **x2** nor **interval** is specified, an implicit
* stackX transform is applied and **x** defaults to the identity function,
- * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise if an **interval**
+ * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise, if an **interval**
* is specified, then **x1** and **x2** are derived from **x**, representing
* the lower and upper bound of the containing interval, respectively.
* Otherwise, if only one of **x1** or **x2** is specified, the other defaults
@@ -65,7 +65,7 @@ export interface BarXOptions extends BarOptions {
x2?: ChannelValueSpec;
/**
- * The optional vertical position of the bar; a ordinal channel typically
+ * The optional vertical position of the bar; an ordinal channel typically
* bound to the *y* scale. If not specified, the bar spans the vertical extent
* of the frame; otherwise the *y* scale must be a *band* scale.
*
@@ -83,7 +83,7 @@ export interface BarYOptions extends BarOptions {
*
* If neither **y1** nor **y2** nor **interval** is specified, an implicit
* stackY transform is applied and **y** defaults to the identity function,
- * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise if an **interval**
+ * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise, if an **interval**
* is specified, then **y1** and **y2** are derived from **y**, representing
* the lower and upper bound of the containing interval, respectively.
* Otherwise, if only one of **y1** or **y2** is specified, the other defaults
@@ -110,7 +110,7 @@ export interface BarYOptions extends BarOptions {
y2?: ChannelValueSpec;
/**
- * The optional horizontal position of the bar; a ordinal channel typically
+ * The optional horizontal position of the bar; an ordinal channel typically
* bound to the *x* scale. If not specified, the bar spans the horizontal
* extent of the frame; otherwise the *x* scale must be a *band* scale.
*
@@ -132,7 +132,7 @@ export interface BarYOptions extends BarOptions {
*
* If neither **x1** nor **x2** nor **interval** is specified, an implicit
* stackX transform is applied and **x** defaults to the identity function,
- * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise if an **interval** is
+ * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise, if an **interval** is
* specified, then **x1** and **x2** are derived from **x**, representing the
* lower and upper bound of the containing interval, respectively. Otherwise, if
* only one of **x1** or **x2** is specified, the other defaults to **x**, which
@@ -173,7 +173,7 @@ export function barX(data?: Data, options?: BarXOptions): BarX;
*
* If neither **y1** nor **y2** nor **interval** is specified, an implicit
* stackY transform is applied and **y** defaults to the identity function,
- * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise if an **interval** is
+ * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise, if an **interval** is
* specified, then **y1** and **y2** are derived from **y**, representing the
* lower and upper bound of the containing interval, respectively. Otherwise, if
* only one of **y1** or **y2** is specified, the other defaults to **y**, which
diff --git a/src/marks/cell.d.ts b/src/marks/cell.d.ts
index 3d3ee26df5..11fb415666 100644
--- a/src/marks/cell.d.ts
+++ b/src/marks/cell.d.ts
@@ -29,7 +29,7 @@ export interface CellOptions extends MarkOptions, InsetOptions, RectCornerOption
/**
* Returns a rectangular cell mark for the given *data* and *options*. Along
* with **x** and/or **y**, a **fill** channel is typically specified to encode
- * value as color. For example, for a heatmap of the IMDb ratings of Simpons
+ * value as color. For example, for a heatmap of the IMDb ratings of Simpsons
* episodes by season:
*
* ```js
@@ -50,7 +50,7 @@ export function cell(data?: Data, options?: CellOptions): Cell;
* Like cell, but **x** defaults to the zero-based index [0, 1, 2, …], and if
* **stroke** is not a channel, **fill** defaults to the identity function,
* assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. For a quick horizontal stripe
- * map visualizating an array of numbers:
+ * map visualizing an array of numbers:
*
* ```js
* Plot.cellX(values)
@@ -62,7 +62,7 @@ export function cellX(data?: Data, options?: CellOptions): Cell;
* Like cell, but **y** defaults to the zero-based index [0, 1, 2, …], and if
* **stroke** is not a channel, **fill** defaults to the identity function,
* assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. For a quick vertical stripe map
- * visualizating an array of numbers:
+ * visualizing an array of numbers:
*
* ```js
* Plot.cellY(values)
diff --git a/src/marks/difference.d.ts b/src/marks/difference.d.ts
index eceda57bfd..b3606c7cc3 100644
--- a/src/marks/difference.d.ts
+++ b/src/marks/difference.d.ts
@@ -71,7 +71,7 @@ export interface DifferenceOptions extends MarkOptions, CurveOptions {
}
/**
- * Returns a new horizontal difference mark for the given the specified *data*
+ * Returns a new horizontal difference mark for the given specified *data*
* and *options*, as in a time-series chart where time goes down↓ (or up↑).
*
* The mark is a composite of a positive area, negative area, and line. The
@@ -84,7 +84,7 @@ export interface DifferenceOptions extends MarkOptions, CurveOptions {
export function differenceX(data?: Data, options?: DifferenceOptions): Difference;
/**
- * Returns a new vertical difference mark for the given the specified *data* and
+ * Returns a new vertical difference mark for the given specified *data* and
* *options*, as in a time-series chart where time goes right→ (or ←left).
*
* The mark is a composite of a positive area, negative area, and line. The
diff --git a/src/marks/dot.d.ts b/src/marks/dot.d.ts
index 61dc131b6b..20e572229b 100644
--- a/src/marks/dot.d.ts
+++ b/src/marks/dot.d.ts
@@ -19,7 +19,7 @@ export interface DotOptions extends MarkOptions {
/**
* The radius of dots; either a channel or constant. When a number, it is
- * interpreted as a constant radius in pixels. Otherwise it is interpreted as
+ * interpreted as a constant radius in pixels. Otherwise, it is interpreted as
* a channel, typically bound to the *r* channel, which defaults to the *sqrt*
* type for proportional symbols. The radius defaults to 4.5 pixels when using
* the **symbol** channel, and otherwise 3 pixels. Dots with a nonpositive
diff --git a/src/marks/tip.js b/src/marks/tip.js
index bfb9d04cb2..dadef65cb2 100644
--- a/src/marks/tip.js
+++ b/src/marks/tip.js
@@ -97,7 +97,7 @@ export class Tip extends Mark {
// The anchor position is the middle of x1 & y1 and x2 & y2, if available,
// or x & y; the former is considered more specific because it’s how we
// disable the implicit stack and interval transforms. If any dimension is
- // unspecified, we fallback to the frame anchor. We also need to know the
+ // unspecified, we fall back to the frame anchor. We also need to know the
// facet offsets to detect when the tip would draw outside the plot, and
// thus we need to change the orientation.
const {x1: X1, y1: Y1, x2: X2, y2: Y2, x: X = X1 ?? X2, y: Y = Y1 ?? Y2} = values;
@@ -341,7 +341,7 @@ function getSourceChannels(channels, scales) {
}
}
- // Then fallback to all other (non-ignored) channels.
+ // Then fall back to all other (non-ignored) channels.
for (const key in channels) {
if (key in sources || key in format || ignoreChannels.has(key)) continue;
if ((key === "x" || key === "y") && channels.geometry) continue; // ignore x & y on geo
diff --git a/src/marks/vector.js b/src/marks/vector.js
index c2420f869e..6c7de404d2 100644
--- a/src/marks/vector.js
+++ b/src/marks/vector.js
@@ -25,7 +25,7 @@ const defaultRadius = 3.5;
// The size of the arrowhead is proportional to its length, but we still allow
// the relative size of the head to be controlled via the mark’s width option;
// doubling the default radius will produce an arrowhead that is twice as big.
-// That said, we’ll probably want a arrow with a fixed head size, too.
+// That said, we’ll probably want an arrow with a fixed head size, too.
const wingRatio = defaultRadius * 5;
const shapeArrow = {
diff --git a/src/marks/waffle.d.ts b/src/marks/waffle.d.ts
index 08354a5724..9a7d847337 100644
--- a/src/marks/waffle.d.ts
+++ b/src/marks/waffle.d.ts
@@ -31,7 +31,7 @@ export interface WaffleYOptions extends BarYOptions, WaffleOptions {}
*
* If neither **y1** nor **y2** nor **interval** is specified, an implicit
* stackY transform is applied and **y** defaults to the identity function,
- * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise if an **interval** is
+ * assuming that *data* = [*y₀*, *y₁*, *y₂*, …]. Otherwise, if an **interval** is
* specified, then **y1** and **y2** are derived from **y**, representing the
* lower and upper bound of the containing interval, respectively. Otherwise, if
* only one of **y1** or **y2** is specified, the other defaults to **y**, which
@@ -53,7 +53,7 @@ export interface WaffleYOptions extends BarYOptions, WaffleOptions {}
export function waffleY(data?: Data, options?: WaffleYOptions): WaffleY;
/**
- * Returns a new horizonta waffle mark for the given *data* and *options*; the
+ * Returns a new horizontal waffle mark for the given *data* and *options*; the
* required *x* values should be quantitative, and the optional *y* values
* should be ordinal. For example, for a horizontal waffle chart of Olympic
* athletes by sport:
@@ -64,7 +64,7 @@ export function waffleY(data?: Data, options?: WaffleYOptions): WaffleY;
*
* If neither **x1** nor **x2** nor **interval** is specified, an implicit
* stackX transform is applied and **x** defaults to the identity function,
- * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise if an **interval** is
+ * assuming that *data* = [*x₀*, *x₁*, *x₂*, …]. Otherwise, if an **interval** is
* specified, then **x1** and **x2** are derived from **x**, representing the
* lower and upper bound of the containing interval, respectively. Otherwise, if
* only one of **x1** or **x2** is specified, the other defaults to **x**, which
diff --git a/src/marks/waffle.js b/src/marks/waffle.js
index 1e848bcc7e..97a9a6fead 100644
--- a/src/marks/waffle.js
+++ b/src/marks/waffle.js
@@ -227,7 +227,7 @@ function waffleCentroid(i1, i2, columns) {
? // Single row
waffleRowCentroid(i1, i2, columns)
: r === 1
- ? // Two incomplete rows; use the midpoint of their overlap if any, otherwise the larger row
+ ? // Two incomplete rows; use the midpoint of their overlap if any; otherwise, the larger row
Math.floor(i2 % columns) > Math.ceil(i1 % columns)
? [(Math.floor(i2 % columns) + Math.ceil(i1 % columns)) / 2, Math.floor(i2 / columns)]
: i2 % columns > columns - (i1 % columns)
@@ -243,7 +243,7 @@ function waffleRowCentroid(i1, i2, columns) {
? // Single cell
[Math.floor(i1 % columns) + 0.5, Math.floor(i1 / columns) + (((i1 + i2) / 2) % 1)]
: c === 1
- ? // Two incomplete cells; use the overlap if large enough, otherwise use the largest
+ ? // Two incomplete cells; use the overlap if large enough; otherwise, use the largest
(i2 % 1) - (i1 % 1) > 0.5
? [Math.ceil(i1 % columns), Math.floor(i2 / columns) + ((i1 % 1) + (i2 % 1)) / 2]
: i2 % 1 > 1 - (i1 % 1)
diff --git a/src/plot.js b/src/plot.js
index 16976c2585..61121ce1d0 100644
--- a/src/plot.js
+++ b/src/plot.js
@@ -139,7 +139,7 @@ export function plot(options = {}) {
stateByMark.set(mark, {data, facets, channels});
}
- // Initalize the scales and dimensions.
+ // Initialize the scales and dimensions.
const scaleDescriptors = createScales(addScaleChannels(channelsByScale, stateByMark, options), options);
const dimensions = createDimensions(scaleDescriptors, marks, options);
diff --git a/src/projection.d.ts b/src/projection.d.ts
index 8856c28c6b..a5fac87b97 100644
--- a/src/projection.d.ts
+++ b/src/projection.d.ts
@@ -71,7 +71,7 @@ export interface ProjectionOptions extends InsetOptions {
/**
* A GeoJSON object to fit to the plot’s frame (minus insets); defaults to a
- * Sphere for spherical projections (outline of the the whole globe).
+ * Sphere for spherical projections (outline of the whole globe).
*/
domain?: GeoPermissibleObjects;
diff --git a/src/scales.d.ts b/src/scales.d.ts
index 1817b67fd8..f3bd753c4a 100644
--- a/src/scales.d.ts
+++ b/src/scales.d.ts
@@ -12,7 +12,7 @@ import type {AxisOptions} from "./marks/axis.js";
* - *hcl* - hue, chroma, perceptual lightness (CIELCh_ab; cylindrical CIELAB)
* - *lab* - perceptual lightness and opponent colors (L\*a\*b\*, CIELAB)
* - an interpolator function that takes a parameter *t* in [0, 1] and returns a value
- * - a interpolator factory that returns an interpolator function for values *a* and *b*
+ * - an interpolator factory that returns an interpolator function for values *a* and *b*
*/
export type Interpolate =
| "number"
@@ -379,7 +379,7 @@ export interface ScaleOptions extends ScaleDefaults {
* Linear scales have a default domain of [0, 1]. Log scales have a default
* domain of [1, 10] and cannot include zero. Radius scales have a default
* domain from 0 to the median first quartile of associated channels. Length
- * have a default domain from 0 to the median median of associated channels.
+ * have a default domain from 0 to the median of medians of associated channels.
* Opacity scales have a default domain from 0 to the maximum value of
* associated channels.
*/
@@ -528,7 +528,7 @@ export interface ScaleOptions extends ScaleDefaults {
*
* A symmetric diverging color scale may not use all of its output **range**;
* this reduces contrast but ensures that deviations both below and above the
- * **pivot** are represented proportionally. Otherwise if false, the full
+ * **pivot** are represented proportionally. Otherwise, if false, the full
* output **range** will be used; this increases contrast but values on
* opposite sides of the **pivot** may not be meaningfully compared.
*/
diff --git a/src/scales/index.js b/src/scales/index.js
index ee2f2b2688..791c1211c1 100644
--- a/src/scales/index.js
+++ b/src/scales/index.js
@@ -12,7 +12,7 @@ export const color = Symbol("color");
export const radius = Symbol("radius");
// Length scales default to the linear type, have a default range of [0, 12],
-// and a default domain from 0 to the median median of associated channels.
+// and a default domain from 0 to the median of medians of associated channels.
export const length = Symbol("length");
// Opacity scales have a default range of [0, 1], and a default domain from 0 to
diff --git a/src/transforms/bin.d.ts b/src/transforms/bin.d.ts
index 28e2b6ad8a..0afdb1eaa1 100644
--- a/src/transforms/bin.d.ts
+++ b/src/transforms/bin.d.ts
@@ -194,7 +194,7 @@ export type BinOutputs = ChannelReducers | (GroupOutputOptions(outputs?: BinOutputs, options?: BinXInputs): Transfor
* If **y** is not in *options*, it defaults to identity. If **y** is not in
* *outputs*, by default produces **y1** and **y2** output channels representing
* the extent of each bin and a **y** output channel representing the bin
- * midpoint, say for for labels. If **x** is not in outputs, **x1** and **x2**
+ * midpoint, say for labels. If **x** is not in outputs, **x1** and **x2**
* will be dropped from the returned *options*. The **insetTop** and
* **insetBottom** options default to 0.5.
*/
diff --git a/test/plots/autoplot.ts b/test/plots/autoplot.ts
index 0b87223e75..388682d080 100644
--- a/test/plots/autoplot.ts
+++ b/test/plots/autoplot.ts
@@ -127,7 +127,7 @@ test(async function autoConnectedScatterplot() {
return Plot.auto(driving, {x: "miles", y: "gas", mark: "line"}).plot();
});
-// shouldnt make a line
+// shouldn't make a line
test(async function autoDotUnsortedDate() {
const athletes = await d3.csv("data/athletes.csv", d3.autoType);
return Plot.auto(athletes, {x: "date_of_birth", y: "height"}).plot();
diff --git a/test/plots/us-presidential-election-2020.ts b/test/plots/us-presidential-election-2020.ts
index 8c9aed9f63..330b8ee3d6 100644
--- a/test/plots/us-presidential-election-2020.ts
+++ b/test/plots/us-presidential-election-2020.ts
@@ -46,8 +46,8 @@ ${[
});
});
-function recase(hypenated) {
- return hypenated
+function recase(hyphenated) {
+ return hyphenated
.split(/-/g)
.map((part) => `${part[0].toUpperCase()}${part.substring(1)}`)
.join(" ");
diff --git a/test/scales/scales-test.js b/test/scales/scales-test.js
index f1fc21eb8f..0e9b271c05 100644
--- a/test/scales/scales-test.js
+++ b/test/scales/scales-test.js
@@ -1270,7 +1270,7 @@ it("plot(…).scale('color') promotes a reversed ordinal scale to an ordinal sca
});
});
-it("plot(…).scale('color') can return a ordinal scale with an explicit range", async () => {
+it("plot(…).scale('color') can return an ordinal scale with an explicit range", async () => {
const penguins = await d3.csv("data/penguins.csv", d3.autoType);
const range = ["yellow", "lime", "black", "red"];
const plot = Plot.dot(penguins, {x: "body_mass_g", fill: "island"}).plot({color: {range}});