Skip to content

Commit a4cc6be

Browse files
committed
Update README
1 parent 7bb533c commit a4cc6be

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@ Returns a new arrow with the given *data* and *options*.
966966
967967
### Auto
968968
969-
[Source](./src/marks/auto.js) · [Examples](https://observablehq.com/@observablehq/plot-auto) · Automatically selects a mark type that best represents the dimensions of the given data according to some simple heuristics. For example,
969+
[Source](./src/marks/auto.js) · [Examples](https://observablehq.com/@observablehq/plot-auto) · Automatically selects a mark type that best represents the dimensions of the given data according to some simple heuristics. Plot.auto seeks to provide a useful initial plot as quickly as possible through opinionated defaults, and to accelerate exploratory analysis by letting you refine views with minimal changes to code. For example,
970970
971971
```js
972972
Plot.auto(olympians, {x: "height", y: "weight"}).plot()
@@ -990,9 +990,7 @@ makes a histogram (equivalent to [rectY](#rect) and [binX](#bin); chosen because
990990
Plot.auto(penguins, {x: "island"}).plot()
991991
```
992992
993-
makes a bar chart (equivalent to [barY](#bar) and [groupX](#group); chosen because the _island_ column is categorical). Note that Plot.auto returns a mark; to generate a plot of this mark, call [*mark*.plot](#markplotoptions) on the returned mark. This allows passing additional plot options, such as to set the dimensions of the plot or to override the scale type. You can also combine the auto mark with other marks—even other auto marks.
994-
995-
Plot.auto seeks to provide a useful initial plot as quickly as possible through opinionated defaults, and to accelerate exploratory analysis by letting you see different dimensions of data with minimal code. For example, you can switch a vertical bar chart to a horizontal one by changing *x* to *y*; you don’t also have to switch barY to barX and groupX to groupY.
993+
makes a bar chart (equivalent to [barY](#bar) and [groupX](#group); chosen because the _island_ column is categorical). Note that Plot.auto returns a [mark](#marks); to then generate a plot (SVG), call [*mark*.plot](#markplotoptions) on the returned mark as shown above. This allows passing plot options, such as to set the chart dimensions or to override a scale type. You can also combine the auto mark with other marks—even other auto marks.
996994
997995
The auto mark supports a subset of the standard [mark options](#mark-options). You must provide at least one position channel:
998996

0 commit comments

Comments
 (0)