You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<a:href="`https://github.com/observablehq/plot/releases/tag/v${version}`":title="`added in v${version}`"target="_blank"rel="external"style="color: inherit;">
Copy file name to clipboardExpand all lines: docs/features/curves.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ The following named curve methods are supported:
79
79
**step* - a piecewise constant function where *y* changes at the midpoint of *x*
80
80
**step-after* - a piecewise constant function where *y* changes after *x*
81
81
**step-before* - a piecewise constant function where *x* changes after *y*
82
-
**auto* - like *linear*, but use the (possibly spherical) [projection](./projections.md), if any
82
+
**auto* - like *linear*, but use the (possibly spherical) [projection](./projections.md), if any <VersionBadgeversion="0.6.1" />
83
83
84
84
If **curve** is a function, it will be invoked with a given *context* in the same fashion as a [D3 curve factory](https://d3js.org/d3-shape/curve#custom-curves). The *auto* curve is only available for the [line mark](../marks/line.md) and [link mark](../marks/link.md) and is typically used in conjunction with a spherical [projection](./projections.md) to interpolate along [geodesics](https://en.wikipedia.org/wiki/Geodesic).
Copy file name to clipboardExpand all lines: docs/features/facets.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -232,7 +232,7 @@ Plot.plot({
232
232
233
233
## Mark facet options
234
234
235
-
Facets can be defined for each mark via the **fx** or **fy** channels. The **fx** and **fy** channels are computed prior to the [mark’s transform](./transforms.md), if any (*i.e.*, facet channels are not transformed). Alternatively, the [**facet** plot option](#plot-facet-options) allows top-level faceting based on data.
235
+
Facets can be defined for each mark via the **fx** or **fy** channels. <VersionBadgeversion="0.6.1" /> The **fx** and **fy** channels are computed prior to the [mark’s transform](./transforms.md), if any (*i.e.*, facet channels are not transformed). Alternatively, the [**facet** plot option](#plot-facet-options) allows top-level faceting based on data.
236
236
237
237
Faceting can be explicitly enabled or disabled on a mark with the **facet** option, which accepts the following values:
238
238
@@ -245,7 +245,7 @@ Faceting can be explicitly enabled or disabled on a mark with the **facet** opti
245
245
When mark-level faceting is used, the default *auto* setting is equivalent to *include*: the mark will be faceted if either the **fx** or **fy** channel option (or both) is specified. The null or false option will disable faceting, while *exclude* draws the subset of the mark’s data *not* in the current facet. When a mark uses *super* faceting, it is not allowed to use position scales (*x*, *y*, *fx*, or *fy*); *super* faceting is intended for decorations, such as labels and legends.
246
246
247
247
248
-
The **facetAnchor** option controls the placement of the mark with respect to the facets. Based on the value, the mark will be displayed on:
248
+
The **facetAnchor** option <VersionBadgeversion="0.6.3" /> controls the placement of the mark with respect to the facets. Based on the value, the mark will be displayed on:
249
249
250
250
* null - non-empty facets
251
251
**top*, *right*, *bottom*, or *left* - the given side
Copy file name to clipboardExpand all lines: docs/features/marks.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -476,7 +476,7 @@ All marks support the following style options:
476
476
***strokeDashoffset** - the [stroke dash offset](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset) (typically in pixels)
477
477
***opacity** - object opacity (a number between 0 and 1)
478
478
***mixBlendMode** - the [blend mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) (*e.g.*, *multiply*)
479
-
***imageFilter** - a CSS [filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) (*e.g.*, *blur(5px)*)
479
+
***imageFilter** - a CSS [filter](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) (*e.g.*, *blur(5px)*) <VersionBadgeversion="0.6.7" />
480
480
***shapeRendering** - the [shape-rendering mode](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) (*e.g.*, *crispEdges*)
481
481
***paintOrder** - the [paint order](https://developer.mozilla.org/en-US/docs/Web/CSS/paint-order) (*e.g.*, *stroke*)
482
482
***dx** - horizontal offset (in pixels; defaults to 0)
@@ -486,7 +486,7 @@ All marks support the following style options:
486
486
***ariaHidden** - if true, hide this content from the accessibility tree
487
487
***pointerEvents** - the [pointer events](https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events) (*e.g.*, *none*)
488
488
***clip** - whether and how to clip the mark
489
-
***tip** - whether to generate an implicit [pointer](../interactions/pointer.md)[tip](../marks/tip.md)
489
+
***tip** - whether to generate an implicit [pointer](../interactions/pointer.md)[tip](../marks/tip.md) <VersionBadgeversion="0.6.7" />
490
490
491
491
If the **clip** option is *frame* (or equivalently true), the mark is clipped to the frame’s dimensions; if the **clip** option is null (or equivalently false), the mark is not clipped. If the **clip** option is *sphere*, then a [geographic projection](./projections.md) is required and the mark will be clipped to the projected sphere (_e.g._, the front hemisphere when using the orthographic projection).
Copy file name to clipboardExpand all lines: docs/features/plots.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -218,7 +218,7 @@ The default **width** is 640. On Observable, the width can be set to the [standa
218
218
Plot does not adjust margins automatically to make room for long tick labels. If your *y* axis labels are too long, you can increase the **marginLeft** to make more room. Also consider using a different **tickFormat** for short labels (*e.g.*, `s` for SI prefix notation), or a scale **transform** (say to convert units to millions or billions).
219
219
:::
220
220
221
-
The **aspectRatio** option<aid="aspectratio"class="header-anchor"href="#aspectratio"aria-label="Permalink to "aspectRatio""></a>, if not null, computes a default **height** such that a variation of one unit in the *x* dimension is represented by the corresponding number of pixels as a variation in the *y* dimension of one unit.
221
+
The **aspectRatio** option<aid="aspectRatio"class="header-anchor"href="#aspectRatio"aria-label="Permalink to "aspectRatio""></a> <VersionBadgeversion="0.6.4" />, if not null, computes a default **height** such that a variation of one unit in the *x* dimension is represented by the corresponding number of pixels as a variation in the *y* dimension of one unit.
Copy file name to clipboardExpand all lines: docs/features/projections.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ onMounted(() => {
28
28
29
29
</script>
30
30
31
-
# Projections
31
+
# Projections <VersionBadgeversion="0.6.1" />
32
32
33
33
A **projection** maps abstract coordinates in *x* and *y* to pixel positions on screen. Most often, abstract coordinates are spherical (degrees longitude and latitude), as when rendering a geographic map. For example, below we show earthquakes in the last seven days with a magnitude of 2.5 or higher as reported by the [USGS](https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php). Use the slider to adjust the *orthographic* projection’s center of longitude.
Copy file name to clipboardExpand all lines: docs/features/scales.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -703,7 +703,7 @@ The default range depends on the scale: for position scales (*x*, *y*, *fx*, and
703
703
704
704
The behavior of the **unknown** scale option depends on the scale type. For quantitative and temporal scales, the unknown value is used whenever the input value is undefined, null, or NaN. For ordinal or categorical scales, the unknown value is returned for any input value outside the domain. For band or point scales, the unknown option has no effect; it is effectively always equal to undefined. If the unknown option is set to undefined (the default), or null or NaN, then the affected input values will be considered undefined and filtered from the output.
705
705
706
-
For data at regular intervals, such as integer values or daily samples, the [**interval** option](#scale-transforms) can be used to enforce uniformity. The specified *interval* — such as d3.utcMonth — must expose an *interval*.floor(*value*), *interval*.offset(*value*), and *interval*.range(*start*, *stop*) functions. The option can also be specified as a number, in which case it will be promoted to a numeric interval with the given step. The option can alternatively be specified as a string (*second*, *minute*, *hour*, *day*, *week*, *month*, *quarter*, *half*, *year*, *monday*, *tuesday*, *wednesday*, *thursday*, *friday*, *saturday*, *sunday*) naming the corresponding time interval, or a skip interval consisting of a number followed by the interval name (possibly pluralized), such as *3 months* or *10 years*. This option sets the default *scale*.transform to the given interval’s *interval*.floor function. In addition, the default *scale*.domain is an array of uniformly-spaced values spanning the extent of the values associated with the scale.
706
+
For data at regular intervals, such as integer values or daily samples, the [**interval** option](#scale-transforms) can be used to enforce uniformity. The specified *interval* — such as d3.utcMonth — must expose an *interval*.floor(*value*), *interval*.offset(*value*), and *interval*.range(*start*, *stop*) functions. The option can also be specified as a number, in which case it will be promoted to a numeric interval with the given step. The option can alternatively be specified as a string (*second*, *minute*, *hour*, *day*, *week*, *month*, *quarter*, *half*, *year*, *monday*, *tuesday*, *wednesday*, *thursday*, *friday*, *saturday*, *sunday*) <VersionBadge version="0.6.2" /> naming the corresponding time interval, or a skip interval consisting of a number followed by the interval name (possibly pluralized), such as *3 months* or *10 years*. This option sets the default *scale*.transform to the given interval’s *interval*.floor function. In addition, the default *scale*.domain is an array of uniformly-spaced values spanning the extent of the values associated with the scale.
707
707
708
708
Quantitative scales can be further customized with additional options:
709
709
@@ -943,7 +943,7 @@ Plot implicitly generates an [axis mark](../marks/axis.md) for position scales i
943
943
***fontVariant** - the font-variant attribute for ticks; defaults to *tabular-nums* if quantitative
944
944
***label** - a string to label the axis
945
945
***labelAnchor** - the label anchor: *top*, *right*, *bottom*, *left*, or *center*
946
-
***labelArrow** - the label arrow: *auto* (default), *up*, *right*, *down*, *left*, *none*, or true
946
+
***labelArrow** - the label arrow: *auto* (default), *up*, *right*, *down*, *left*, *none*, or true <VersionBadgeversion="0.6.7" />
947
947
***labelOffset** - the label position offset (in pixels; default depends on margins and orientation)
948
948
***ariaLabel** - a short label representing the axis in the accessibility tree
949
949
***ariaDescription** - a textual description for the axis
Copy file name to clipboardExpand all lines: docs/features/transforms.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -236,15 +236,15 @@ This helper for constructing derived columns returns a [*column*, *setColumn*] a
236
236
237
237
This method is used by Plot’s transforms to derive channels; the associated columns are populated (derived) when the **transform** option function is invoked.
Copy file name to clipboardExpand all lines: docs/interactions/crosshair.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ import penguins from "../data/penguins.ts";
8
8
9
9
</script>
10
10
11
-
# Crosshair mark
11
+
# Crosshair mark <VersionBadgeversion="0.6.7" />
12
12
13
13
The **crosshair mark** shows the *x* (horizontal↔︎ position) and *y* (vertical↕︎ position) value of the point closest to the [pointer](./pointer.md) on the bottom and left sides of the frame, respectively.
The **pointer transform** filters a mark interactively such that only the point closest to the pointer is rendered. It is typically used to show details on hover, often with a [tip](../marks/tip.md) or [crosshair](./crosshair.md) mark, but it can be paired with any mark.
Copy file name to clipboardExpand all lines: docs/marks/auto.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ onMounted(() => {
15
15
16
16
</script>
17
17
18
-
# Auto mark
18
+
# Auto mark <VersionBadgeversion="0.6.3" />
19
19
20
20
The magic ✨ **auto mark** automatically selects a mark type that best represents the given dimensions of the data according to some simple heuristics. The auto mark — which powers [Observable’s chart cell](https://observablehq.com/@observablehq/chart-cell) — is intended to support fast exploratory analysis where the goal is to get a useful plot as quickly as possible. For example, two quantitative dimensions make a scatterplot:
Copy file name to clipboardExpand all lines: docs/marks/axis.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ const responses = [
21
21
22
22
</script>
23
23
24
-
# Axis mark
24
+
# Axis mark <VersionBadgeversion="0.6.3" />
25
25
26
26
The **axis mark** conveys the meaning of a position [scale](../features/scales.md): _x_ or _y_, and _fx_ or _fy_ when [faceting](../features/facets.md). Plot automatically adds default axis marks as needed, but you can customize the appearance of axes either through scale options or by explicitly declaring an axis mark.
27
27
@@ -143,7 +143,7 @@ Plot.plot({
143
143
```
144
144
:::
145
145
146
-
Time axes default to a consistent multi-line tick format, [à la Datawrapper](https://blog.datawrapper.de/new-axis-ticks/), for example showing the first month of each quarter, and the year:
146
+
Time axes default to a consistent multi-line tick format <VersionBadgeversion="0.6.9" />, [à la Datawrapper](https://blog.datawrapper.de/new-axis-ticks/), for example showing the first month of each quarter, and the year:
Copy file name to clipboardExpand all lines: docs/marks/bollinger.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ const k = ref(2);
10
10
11
11
</script>
12
12
13
-
# Bollinger mark
13
+
# Bollinger mark <Badgetype="warning"text="prerelease" />
14
14
15
15
The **bollinger mark** is a [composite mark](../features/marks.md#marks) consisting of a [line](./line.md) representing a moving average and an [area](./area.md) representing volatility as a band; the band thickness is proportional to the deviation of nearby values. The bollinger mark is often used to analyze the price of financial instruments such as stocks.
Copy file name to clipboardExpand all lines: docs/marks/contour.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ function mandelbrot(x, y) {
23
23
24
24
</script>
25
25
26
-
# Contour mark
26
+
# Contour mark <VersionBadgeversion="0.6.2" />
27
27
28
28
:::tip
29
29
To produce a heatmap instead of contours, see the [raster mark](./raster.md). For contours of estimated point density, see the [density mark](./density.md).
The **anchor** option, if specified to a value of *left*, *right*, *top* or *bottom*, draws only that side of the frame. In that case, the **fill** and **rx**, **ry** options are ignored.
96
+
The **anchor** option <VersionBadgeversion="0.6.3" />, if specified to a value of *left*, *right*, *top* or *bottom*, draws only that side of the frame. In that case, the **fill** and **rx**, **ry** options are ignored.
Copy file name to clipboardExpand all lines: docs/marks/geo.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ onMounted(() => {
31
31
32
32
</script>
33
33
34
-
# Geo mark
34
+
# Geo mark <VersionBadgeversion="0.6.1" />
35
35
36
36
The **geo mark** draws geographic features — polygons, lines, points, and other geometry — often as thematic maps. It works with Plot’s [projection system](../features/projections.md). For example, the [choropleth map](https://en.wikipedia.org/wiki/Choropleth_map) below shows unemployment by county in the United States.
Returns a new geo mark with the given *data* and *options*. If *data* is a GeoJSON feature collection, then the mark’s data is *data*.features; if *data* is a GeoJSON geometry collection, then the mark’s data is *data*.geometries; if *data* is some other GeoJSON object, then the mark’s data is the single-element array [*data*]. If the **geometry** option is not specified, *data* is assumed to be a GeoJSON object or an iterable of GeoJSON objects.
Copy file name to clipboardExpand all lines: docs/marks/grid.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ const atop = ref(true);
9
9
10
10
</script>
11
11
12
-
# Grid mark
12
+
# Grid mark <VersionBadgeversion="0.6.3" />
13
13
14
14
The **grid mark** is a specially-configured [rule](./rule.md) for drawing an axis-aligned grid. Like the [axis mark](./axis.md), a grid mark is automatically generated by Plot when you use the **grid** scale option. But you can also declare a grid mark explicitly, for example to draw grid lines atop rather than below bars.
0 commit comments