Skip to content

Commit e211637

Browse files
Improve documentation (#426)
* Fix typos * Fix typos * Update default palette
1 parent 44eb17d commit e211637

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

doc/syntax/scale/aesthetic/1_color.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Note that all different types of color notation can be mixed in the same place.
6060
Literal color values may be translucent, either by providing a fourth channel the the hex-notation, or by using a css color function that includes an alpha level (e.g. `rgba()`). You should avoid mixing this with the use of the opacity aesthetic to ensure the opacity is predictable.
6161

6262
## Palettes
63-
There are two different types of palettes for fill and stroke — those intended for continuous data and those intended for discrete data. While they both consists of multiple color values, the continuous palettes are meant for interpolation between successive values whereas the discrete palettes are not.
63+
There are two different types of palettes for fill and stroke — those intended for continuous data and those intended for discrete data. While they both consist of multiple color values, the continuous palettes are meant for interpolation between successive values whereas the discrete palettes are not.
6464

6565
Palettes are used by giving them as names in the `TO` clause:
6666

doc/syntax/scale/type/continuous.qmd

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The continuous scale type maps various continuous data types into a continuous o
99
## Input range
1010
The input range for continuous scales are defined by their minimum and maximum values. These can be given explicitly or deduced from the mapped data. If `FROM` is omitted then the range of the mapped data is used. If provided as an array of length 2 then the first element will set the minimum and the second element will set the maximum. If either of these elements are `null` then that part of the range will be deduced from the data. As an example `SCALE x FROM (0, null)` will set the minimum part of the range to 0 and the maximum part to the maximal value of the mapped data.
1111

12-
Position aesthetics (`x` and `y`) will have their range expanded based on the `expand` setting.
12+
Position aesthetics (`x` and `y`) will have their range expanded based on the `expand` setting.
1313
If values in the mapped data falls outside of the input domain the values will be changed based on the `oob` setting.
1414

1515
The input range is converted to the type defined by the transformation. This means that a time range can both be given as a `%H:%M:%S` string or as a numeric giving the number of nanoseconds since midnight.
@@ -38,11 +38,11 @@ The output range can either be given as an array of values or a named palette. F
3838
All aesthetics have a default output range so it is never required to provide one unless you want to change from the default. The defaults are as follows:
3939

4040
* `x`/`y`: Ignored (values used directly)
41-
* `stroke`/`fill`: The `navia` palette
41+
* `stroke`/`fill`: The `sequential` palette
4242
* `size`/`linewidth`: `(1, 6)` (points)
4343
* `opacity`: `(0.1, 1.0)` (0 being fully transparent and 1 being fully opaque)
4444

45-
The remaining aesthetics doesn't have a meaningful continuous output domain and doesn't work with continuous scales. Consider using a [binned scale](binned.qmd) for these if necessary.
45+
The remaining aesthetics don't have a meaningful continuous output domain and don't work with continuous scales. Consider using a [binned scale](binned.qmd) for these if necessary.
4646

4747
### Examples
4848

@@ -63,7 +63,7 @@ SCALE color TO ('black', 'red', 'white')
6363
```
6464

6565
## Transformation
66-
The transformation of the scale both defines how the input data is parsed as well as any mathematical transformation applied before it is mapped to the output range. The default transformation is deduced from a combination of the mapped data and the aesthetic the scale is applied to.
66+
The transformation of the scale both defines how the input data is parsed as well as any mathematical transformation applied before it is mapped to the output range. The default transformation is deduced from a combination of the mapped data and the aesthetic the scale is applied to.
6767

6868
* `linear`: The default transformation unless stated otherwise. Creates a linear mapping between the input and output range.
6969
* `log`/`log2`/`ln`: Creates a mapping between the logarithm of the input to the output range.
@@ -82,15 +82,15 @@ If not provided explicitly by the user the breaks for the scales will be calcula
8282

8383
* `linear`:
8484
- `pretty => true`: Will use Wilkinsons Extended algorithm to attempt to find nice breaks in the given interval close to the number of breaks requested
85-
- `pretty => false`: Will produce the requested number of evenly spaced breaks within the scale range
86-
* `log`/`log2`/`ln`:
85+
- `pretty => false`: Will produce the requested number of evenly spaced breaks within the scale range
86+
* `log`/`log2`/`ln`:
8787
- `pretty => true`: Will use the 1-2-5 pattern and thin down to approximately the requested number of breaks
8888
- `pretty => false`: Breaks will be exclusively at the power of the base (e.g. 1, 10, 100, 1000 for log10)
8989
* `exp10`/`exp2`/`exp`: Same logic as the log breaks but in the inverse direction
9090
* `sqrt`/`square`: Like `linear` but the range is first converted to sqrt space and the breaks are then converted back
9191
* `asinh`/`pseudo_log`/`pseudo_log2`/`pseudo_ln`: Like `log` but includes zero and negates the breaks for the negative part
9292
* `integer`: Like `linear` except disallowing breaks at fractional parts
93-
* `date`/`datetime`/`time`:
93+
* `date`/`datetime`/`time`:
9494
- `breaks => <interval>`: If breaks are given as an interval (e.g. `week`, `30 seconds` or `5 years`) then the breaks will get that spacing aligned at the interval boundary (Jan 1 for years, etc). This ignores the `pretty` setting
9595
- `pretty => true`: An appropriate interval is chosen that approximates the requested number of breaks and then used as above
9696
- `pretty => false`: Linear spacing in integer space as close to the requested number of breaks
@@ -154,7 +154,7 @@ The following settings are recognised by continuous scales:
154154
```{ggsql}
155155
VISUALISE bill_len AS x, bill_dep AS y FROM ggsql:penguins
156156
DRAW point
157-
SCALE x
157+
SCALE x
158158
SETTING expand => (0.0, 10)
159159
```
160160

@@ -172,7 +172,7 @@ SCALE y FROM (15, 20)
172172
```{ggsql}
173173
VISUALISE bill_len AS x, bill_dep AS y FROM ggsql:penguins
174174
DRAW point
175-
SCALE x
175+
SCALE x
176176
SETTING breaks => (37, 42, 55)
177177
```
178178

@@ -181,7 +181,7 @@ SCALE x
181181
```{ggsql}
182182
VISUALISE bill_len AS x, bill_dep AS y FROM ggsql:penguins
183183
DRAW point
184-
SCALE x
184+
SCALE x
185185
SETTING reverse => true
186186
```
187187

@@ -203,7 +203,7 @@ You can combine formatting with direct renaming in which case the direct renamin
203203
```{ggsql}
204204
VISUALISE bill_len AS x, bill_dep AS y FROM ggsql:penguins
205205
DRAW point
206-
SCALE x
206+
SCALE x
207207
RENAMING 50 => 'Fifty'
208208
```
209209

@@ -212,7 +212,7 @@ SCALE x
212212
```{ggsql}
213213
VISUALISE bill_len AS x, bill_dep AS y FROM ggsql:penguins
214214
DRAW point
215-
SCALE x
215+
SCALE x
216216
RENAMING * => '{} mm'
217217
```
218218

0 commit comments

Comments
 (0)