Skip to content

Commit 703b2a3

Browse files
committed
Use relative links within pkgdown site (closes #43)
1 parent 2ea8046 commit 703b2a3

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

vignettes/articles/colours.Rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The `grey` in this palette does not meet the required colour contrast with an of
106106

107107
### Social Security Scotland {#sss}
108108

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).
110110

111111
If you have any questions about these palettes, please contact the [Social Security Scotland statistics mailbox](mailto:[email protected]).
112112

@@ -157,7 +157,7 @@ sgplot:::colour_table(sgplot::sss_colour_palettes$focus)
157157

158158
### Government Analysis Function {#af}
159159

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](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).
161161

162162

163163
#### Main palette
@@ -224,8 +224,8 @@ There may be instances where you'd like to use a different colour palette.
224224
If so, this should be carefully considered to ensure it meets accessibility requirements.
225225
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.
226226

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).
229229

230230

231231
## Viewing palettes in R
@@ -249,4 +249,4 @@ sgplot::sss_colour_palettes
249249
sgplot::af_colour_palettes
250250
```
251251

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).

vignettes/articles/cookbook.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Titles, subtitles and captions have been embedded in the charts in this cookbook
4343

4444
### use_sgplot
4545

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).
4747

4848

4949
```{r chart-types, child = "cookbook/_chart-types.Rmd"}

vignettes/articles/cookbook/_colour-palettes.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
sgplot provides colour palettes as set out by the [Scottish Government Design System](https://designsystem.gov.scot/guidance/charts/data-visualisation-colour-palettes).
44
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).
55

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.
77

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).
99

1010
More information on the colours used in sgplot can be found at `vignette("colours")`.
1111

@@ -43,7 +43,7 @@ gapminder |>
4343

4444
Note: This chart is for demonstration purposes only. Accessibility guidance recommends using a maximum of four colours to avoid clutter.
4545

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).
4747
For example, to use the Analysis Function `main2` palette:
4848

4949
```{r af-palette, fig.height = 5}
@@ -125,4 +125,4 @@ gapminder |>
125125

126126
#### Adding a new colour palette to sgplot
127127

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).

vignettes/articles/cookbook/_customisations.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following section demonstrates some common customisations made to `{ggplot2}` charts. Each example builds on the previous one.
44

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).
66

77
Customisations will be made to the following basic horizontal bar chart:
88

0 commit comments

Comments
 (0)