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
Copy file name to clipboardExpand all lines: vignettes/articles/colours.Rmd
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ The `grey` in this palette does not meet the required colour contrast with an of
106
106
107
107
### Social Security Scotland {#sss}
108
108
109
-
To use a Social Security Scotland palette, set `palette_type = "sss"` when using any of the `scale_`[colour functions](https://scotgovanalysis.github.io/sgplot/reference/index.html#colour-scales).
109
+
To use a Social Security Scotland palette, set `palette_type = "sss"` when using any of the `scale_`[colour functions](../reference/index.html#colour-scales).
110
110
111
111
If you have any questions about these palettes, please contact the [Social Security Scotland statistics mailbox](mailto:[email protected]).
The Government Analysis Function guidance also contains [suggested colour palettes](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-4). These are also provided in sgplot, however the Scottish Government palettes are used by default. To use an Analysis Function palette, set `palette_type = "af"` when using any of the `scale_`[colour functions](https://scotgovanalysis.github.io/sgplot/reference/index.html#colour-scales).
160
+
The Government Analysis Function guidance also contains [suggested colour palettes](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-4). These are also provided in sgplot, however the Scottish Government palettes are used by default. To use an Analysis Function palette, set `palette_type = "af"` when using any of the `scale_`[colour functions](../reference/index.html#colour-scales).
161
161
162
162
163
163
#### Main palette
@@ -224,8 +224,8 @@ There may be instances where you'd like to use a different colour palette.
224
224
If so, this should be carefully considered to ensure it meets accessibility requirements.
225
225
The Analysis Function guidance outlines [appropriate steps for choosing your own accessible colour palette](https://analysisfunction.civilservice.gov.uk/policy-store/data-visualisation-colours-in-charts/#section-9) and should be used.
226
226
227
-
An example of how to use an alternative colour palette is provided in the [cookbook](https://scotgovanalysis.github.io/sgplot/articles/cookbook.html#using-your-own-colour-palette).
228
-
However, if you use a different palette regularly and feel it would be useful for this to be added to sgplot, please make a suggestion as per the [contributing guidance](https://scotgovanalysis.github.io/sgplot/CONTRIBUTING.html).
227
+
An example of how to use an alternative colour palette is provided in the [cookbook](cookbook.html#using-your-own-colour-palette).
228
+
However, if you use a different palette regularly and feel it would be useful for this to be added to sgplot, please make a suggestion as per the [contributing guidance](../CONTRIBUTING.html).
229
229
230
230
231
231
## Viewing palettes in R
@@ -249,4 +249,4 @@ sgplot::sss_colour_palettes
249
249
sgplot::af_colour_palettes
250
250
```
251
251
252
-
Examples of how to apply these palettes to ggplot2 charts are available in both the [cookbook](https://scotgovanalysis.github.io/sgplot/articles/cookbook.html) and the reference files for `scale_`[colour functions](https://scotgovanalysis.github.io/sgplot/reference/index.html#colour-scales).
252
+
Examples of how to apply these palettes to ggplot2 charts are available in both the [cookbook](cookbook.html) and the reference files for `scale_`[colour functions](../reference/index.html#colour-scales).
Copy file name to clipboardExpand all lines: vignettes/articles/cookbook.Rmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Titles, subtitles and captions have been embedded in the charts in this cookbook
43
43
44
44
### use_sgplot
45
45
46
-
The examples in this cookbook use the sgplot theme and colour functions explicitly, however it may be easier to make use of the `use_sgplot()` function if your charts all require a similar style. More information on `use_sgplot` can be found on the [sgplot homepage](https://scotgovanalysis.github.io/sgplot/#use-sgplot-as-default).
46
+
The examples in this cookbook use the sgplot theme and colour functions explicitly, however it may be easier to make use of the `use_sgplot()` function if your charts all require a similar style. More information on `use_sgplot` can be found on the [sgplot homepage](../index.html#use-sgplot-as-default).
Copy file name to clipboardExpand all lines: vignettes/articles/cookbook/_colour-palettes.Rmd
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@
3
3
sgplot provides colour palettes as set out by the [Scottish Government Design System](https://designsystem.gov.scot/guidance/charts/data-visualisation-colour-palettes).
4
4
These palettes have been developed to meet the [Web Content Accessibility Guidelines 2.1 for graphical objects](https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html).
5
5
6
-
The [main palette](https://scotgovanalysis.github.io/sgplot/articles/colours.html#sg-main) is the default for discrete colour/fill functions, and the [sequential palette](https://scotgovanalysis.github.io/sgplot/articles/colours.html#sg-sequential) for continuous colour/fill functions.
6
+
The [main palette](colours.html#sg-main) is the default for discrete colour/fill functions, and the [sequential palette](colours.html#sg-sequential) for continuous colour/fill functions.
7
7
8
-
The Scottish Government palettes are used by default, however palettes are also available for [Social Security Scotland](https://scotgovanalysis.github.io/sgplot/articles/colours.html#sss) and the [Government Analysis Function](https://scotgovanalysis.github.io/sgplot/articles/colours.html#af).
8
+
The Scottish Government palettes are used by default, however palettes are also available for [Social Security Scotland](colours.html#sss) and the [Government Analysis Function](colours.html#af).
9
9
10
10
More information on the colours used in sgplot can be found at `vignette("colours")`.
11
11
@@ -43,7 +43,7 @@ gapminder |>
43
43
44
44
Note: This chart is for demonstration purposes only. Accessibility guidance recommends using a maximum of four colours to avoid clutter.
45
45
46
-
To use an Analysis Function palette, set `palette_type = "af"` when using any of the `scale_`[colour functions](https://scotgovanalysis.github.io/sgplot/reference/index.html#colour-scales).
46
+
To use an Analysis Function palette, set `palette_type = "af"` when using any of the `scale_`[colour functions](../reference/index.html#colour-scales).
47
47
For example, to use the Analysis Function `main2` palette:
48
48
49
49
```{r af-palette, fig.height = 5}
@@ -125,4 +125,4 @@ gapminder |>
125
125
126
126
#### Adding a new colour palette to sgplot
127
127
128
-
If you use a different palette regularly and feel it would be useful for this to be added to sgplot, please make a suggestion as per the [contributing guidance](https://scotgovanalysis.github.io/sgplot/CONTRIBUTING.html).
128
+
If you use a different palette regularly and feel it would be useful for this to be added to sgplot, please make a suggestion as per the [contributing guidance](../CONTRIBUTING.html).
Copy file name to clipboardExpand all lines: vignettes/articles/cookbook/_customisations.Rmd
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The following section demonstrates some common customisations made to `{ggplot2}` charts. Each example builds on the previous one.
4
4
5
-
Note that `theme_sg()` has arguments to control the legend position and appearance of grid lines, axis lines and axis ticks. More information on accepted values can be found in the [help file](https://scotgovanalysis.github.io/sgplot/reference/theme_sg.html).
5
+
Note that `theme_sg()` has arguments to control the legend position and appearance of grid lines, axis lines and axis ticks. More information on accepted values can be found in the [help file](../reference/theme_sg.html).
6
6
7
7
Customisations will be made to the following basic horizontal bar chart:
0 commit comments