Skip to content

Commit 75cc028

Browse files
committed
updates based on review
1 parent 7f2ae2f commit 75cc028

67 files changed

Lines changed: 1035 additions & 835 deletions

Some content is hidden

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

doc/syntax/clause/facet.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This clause behaves much like the `SETTINGS` clause in `DRAW`, in that it allows
3434
* `'y'`: Shared x-axis scale, independent y-axis scale
3535
* `['x', 'y']`: Independent scales for both axes
3636
* `missing`: Determines how layers behave when the faceting column is missing. It can take two values: `'repeat'` (default), and `'null'`. If `'repeat'` is set, then the layer data is repeated in each panel. If `'null'`, then such layers are only displayed if a null panel is shown, as controlled by the facet scale.
37-
* `ncol`/`nrow`: The dimensions of the layout when faceting by a single variable. Only one of these can be given, as the other is derived based on the number of panels to draw. Default is 3 columns when fewer than 6 categories are present, 4 columns when fewer than 12 categories are present and otherwise 5 columns. When the `BY`-clause is used to set a second faceting variable, the `ncol` and `nrow` setting are not allowed.
37+
* `ncol`/`nrow`: The dimensions of the layout when faceting by a single variable (whole number >= 1). Only one of these can be given, as the other is derived based on the number of panels to draw. Default is 3 columns when fewer than 6 categories are present, 4 columns when fewer than 12 categories are present and otherwise 5 columns. When the `BY`-clause is used to set a second faceting variable, the `ncol` and `nrow` setting are not allowed.
3838

3939
### Facet variables as aesthetics
4040
When you apply faceting to a plot you are creating new aesthetics you can control. For 1-dimensional faceting (no `BY` clause) the aesthetic is called `panel` and for 2-dimensional faceting the aesthetics are called `row` and `column`. You can read more about these aesthetics in [their documentation](../scale/aesthetic/Z_faceting.qmd)

doc/syntax/coord/cartesian.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ assuming they do not try to use a name that is already being used by any facet o
2020

2121
## Settings
2222
* `clip`: Should data be removed if it appears outside the bounds of the coordinate system. Defaults to `true`
23-
* `ratio`: The aspect ratio between the steps on the vertical and horizontal axis. Defaults to `null` (no enforced aspect ratio)
23+
* `ratio`: The aspect ratio between the steps on the vertical and horizontal axis (must be > 0 if specified). Defaults to `null` (no enforced aspect ratio)
2424

2525
## Examples
2626

doc/syntax/coord/polar.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ This maps `y` to radius and `x` to theta (angle). This is useful when converting
2020

2121
## Settings
2222
* `clip`: Should data be removed if it appears outside the bounds of the coordinate system. Defaults to `true`
23-
* `start`: The starting angle in degrees for the theta scale. Controls where "0" on the angular axis begins. Defaults to `0` (12 o'clock position).
23+
* `start`: The starting angle in degrees for the theta scale (-360 to 360). Controls where "0" on the angular axis begins. Defaults to `0` (12 o'clock position).
2424
- `0` = 12 o'clock position (top)
2525
- `90` = 3 o'clock position (right)
2626
- `-90` or `270` = 9 o'clock position (left)
2727
- `180` = 6 o'clock position (bottom)
28-
* `end`: The ending angle in degrees for the theta scale. Defaults to `start + 360` (a full circle). Use this with `start` to create partial polar plots like gauge charts or half-circle visualizations.
28+
* `end`: The ending angle in degrees for the theta scale (-360 to 360). Defaults to `start + 360` (a full circle). Use this with `start` to create partial polar plots like gauge charts or half-circle visualizations.
2929
* `inner`: The inner radius as a proportion (0 to 1) of the outer radius. Defaults to `0` (no hole). Setting this creates a donut chart where the inner portion is empty.
3030
- `0` = full pie (no hole)
3131
- `0.3` = donut with 30% hole

doc/syntax/layer/position/dodge.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Dodge doesn't have specific requirements to the scale type of the plot, but will
1212
## Settings
1313
Apart from the settings of the layer type, setting `position => 'dodge'` will allow these additional settings:
1414

15-
* `width`: The total width the dodging will occupy as a proportion of the space available on the scale. Defaults to 0.9 but any defaults from the layer will take precedence.
15+
* `width`: The total width the dodging will occupy as a proportion of the space available on the scale (0 to 1). Defaults to 0.9 but any defaults from the layer will take precedence.
1616

1717
## Examples
1818

doc/syntax/layer/position/jitter.qmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ Jitter requires at least one axis to be discrete as it only jitters along discre
1212
## Settings
1313
Apart from the settings of the layer type, setting `position => 'jitter'` will allow these additional settings:
1414

15-
* `width`: The total width the jittering will occupy as a proportion of the space available on the scale. Defaults to 0.9
15+
* `width`: The total width the jittering will occupy as a proportion of the space available on the scale (0 to 1). Defaults to 0.4
1616
* `dodge`: Should dodging be applied before jittering. The dodging behavior follows the [dodge position](dodge.qmd) behavior? Default to `true`
1717
* `distribution`: Which kind of distribution should the jittering follow? One of:
1818
- `'uniform'` (default): Jittering is sampled from a uniform distribution between `-width/2` and `width/2`
1919
- `'normal'`: Jittering is sampled from a normal distribution with σ as `width/4` resulting in 95% of the points falling inside the given width
2020
- `'density'`: Jittering follows the density distribution within the group so that the jitter occupies the same area as an equivalent [violin plot](../type/violin.qmd) with density remapped to offset
2121
- `'intensity'`: Jittering follows the intensity distribution within the group so that the jitter occupies the same area as an equivalent [violin plot](../type/violin.qmd) with intensity remapped to offset
22-
22+
2323
If `distribution` is either `'density'` or `'intensity'` then one of the axes must be continuous
24-
* `bandwidth`: A numerical value setting the smoothing bandwidth to use for the `'density'` and `'intensity'` distributions. If absent (default), the bandwidth will be computed using Silverman's rule of thumb.
25-
* `adjust`: A numerical value as multiplier for the `bandwidth` setting, with 1 as default.
24+
* `bandwidth`: Smoothing bandwidth for the `'density'` and `'intensity'` distributions (must be > 0). If absent (default), the bandwidth will be computed using Silverman's rule of thumb.
25+
* `adjust`: Multiplier for the `bandwidth` setting (must be > 0). Defaults to 1.
2626

2727
## Examples
2828
When plotting points on a discrete axis they are all placed in the middle

doc/syntax/layer/position/stack.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Stack requires a continuous scale with a range mapping (e.g. either `y` + `yend`
1313
Apart from the settings of the layer type, setting `position => 'stack'` will allow these additional settings:
1414

1515
* `center`: Should the full stack be centered around 0. Can be used in conjunction with area layers to create steamgraphs. Default to `false`
16-
* `total`: Sets a total value to which each stack height is normalised. Setting this value leads to 'fill' behaviour. Defaults to `null` (no normalisation)
16+
* `total`: Sets a total value to which each stack height is normalised (must be > 0 if specified). Setting this value leads to 'fill' behaviour. Defaults to `null` (no normalisation)
1717

1818
## Examples
1919

doc/syntax/layer/type/area.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ The following aesthetics are recognised by the area layer.
2121
* `linewidth`: The width of the contour lines.
2222

2323
## Settings
24-
* `position`: Determines the position adjustment to use for the layer (default is `'stack'`)
25-
* `orientation`: The orientation of the layer, see the [Orientation section](#orientation). One of the following:
24+
* `position`: Position adjustment. One of `'identity'`, `'stack'` (default), `'dodge'`, or `'jitter'`
25+
* `orientation`: The orientation of the layer, see the [Orientation section](#orientation). One of the following:
2626
* `'aligned'` to align the layer's primary axis with the coordinate system's first axis.
2727
* `'transposed'` to align the layer's primary axis with the coordinate system's second axis.
2828

doc/syntax/layer/type/bar.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ The bar layer has no required aesthetics
2323
* `linetype`: The type of stroke, i.e. the dashing pattern
2424

2525
## Settings
26-
* `position`: Determines the position adjustment to use for the layer (default is `'stack'`)
27-
* `width`: The width of the bars as a proportion of the available width
26+
* `position`: Position adjustment. One of `'identity'`, `'stack'` (default), `'dodge'`, or `'jitter'`
27+
* `width`: The width of the bars as a proportion of the available width (0 to 1)
2828

2929
## Data transformation
3030
If the secondary axis has not been mapped the layer will calculate counts for you and display these as the secondary axis.

doc/syntax/layer/type/boxplot.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ The following aesthetics are recognised by the boxplot layer.
2323
* `shape` The shape of outlier points.
2424

2525
## Settings
26-
* `position`: Determines the position adjustment to use for the layer (default is `'dodge'`)
26+
* `position`: Position adjustment. One of `'identity'`, `'stack'`, `'dodge'` (default), or `'jitter'`
2727
* `outliers`: Whether to display outliers as points. Defaults to `true`.
28-
* `coef`: A number indicating the length of the whiskers as a multiple of the interquartile range (IQR). Defaults to `1.5`.
29-
* `width`: Relative width of the boxes. Defaults to `0.9`.
28+
* `coef`: Length of the whiskers as a multiple of the IQR (must be >= 0). Defaults to `1.5`.
29+
* `width`: Relative width of the boxes (0 to 1). Defaults to `0.9`.
3030

3131
## Data transformation
3232
Per group, data will be divided into 4 quartiles and summary statistics will be derived from their extremes.

doc/syntax/layer/type/density.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ The following aesthetics are recognised by the density layer.
2121
* `linetype` The dash pattern of the contour line.
2222

2323
## Settings
24-
* `position`: Determines the position adjustment to use for the layer (default is `'identity'`)
25-
* `bandwidth`: A numerical value setting the smoothing bandwidth to use. If absent (default), the bandwidth will be computed using Silverman's rule of thumb.
26-
* `adjust`: A numerical value as multiplier for the `bandwidth` setting, with 1 as default.
24+
* `position`: Position adjustment. One of `'identity'` (default), `'stack'`, `'dodge'`, or `'jitter'`
25+
* `bandwidth`: Smoothing bandwidth (must be > 0). If absent (default), the bandwidth will be computed using Silverman's rule of thumb.
26+
* `adjust`: Multiplier for the `bandwidth` setting (must be > 0). Defaults to 1.
2727
* `kernel`: Determines the smoothing kernel shape. Can be one of the following:
2828
* `'gaussian'` (default)
2929
* `'epanechnikov'`

0 commit comments

Comments
 (0)