Skip to content

Commit

Permalink
Merge pull request #36 from olivroy/fix-image-links
Browse files Browse the repository at this point in the history
Move all figures to `man/figures` + update README
  • Loading branch information
mtennekes authored Oct 17, 2024
2 parents d7d3329 + e9aee8a commit 7e7cdec
Show file tree
Hide file tree
Showing 37 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
^docs$
^pkgdown$
^\.github$
man/figures/logo.png
^man/figures$
^vignettes/articles$
20 changes: 10 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ The main tool is a dashboard, which is started with:
c4a_gui()
```

[<img src="articles/cols4all2.jpg" width="900"/>](articles/cols4all2.jpg)
[<img src="man/figures/cols4all2.jpg" width="900"/>](man/figures/cols4all2.jpg)


What palettes are available? That is, by default; other palettes can be added!
Expand Down Expand Up @@ -113,7 +113,7 @@ Find a trade-off you like among the following properties (the columns in the mai

When we are looking for a fair categorical palette of seven colors that is as color blind friendly as possible, then filter on "Fair", and sort by "Colorblind-friendly":

[<img src="articles/cols4all_fair_sort_cbf.jpg" width="900"/>](articles/cols4all_fair_sort_cbf.jpg)
[<img src="man/figures/cols4all_fair_sort_cbf.jpg" width="900"/>](man/figures/cols4all_fair_sort_cbf.jpg)


This inspired us to develop our own palettes: see these `cols4all` palettes below.
Expand All @@ -122,33 +122,33 @@ This inspired us to develop our own palettes: see these `cols4all` palettes belo

Say we need a diverging palette that is color blind friendly, and what to choose one by eye. Then filter by "Colorblind-friendly" and sort by "Hue Middle L" (the hue of the left wing):

[<img src="articles/cols4all_div.jpg" width="900"/>](articles/cols4all_div.jpg)
[<img src="man/figures/cols4all_div.jpg" width="900"/>](man/figures/cols4all_div.jpg)

Reverse sorting is also applied.

## Preliminary set of new `cols4all` palettes

We applied a basic heuristic to explore palettes that score well on a mix of the properties named above

[<img src="articles/c4a_pals.jpg" width="900"/>](articles/c4a_pals.jpg)
[<img src="man/figures/c4a_pals.jpg" width="900"/>](man/figures/c4a_pals.jpg)

`area7`, `area8` and `area9` are fair, contain low pastel colors, and are color-blind friendly (up to 7 colors). So ideal for maps and other space-filling visualizations! These are used in [https://github.com/r-tmap/tmap](`tmap4`).
`area7`, `area8` and `area9` are fair, contain low pastel colors, and are color-blind friendly (up to 7 colors). So ideal for maps and other space-filling visualizations! These are used in [`tmap4`](https://github.com/r-tmap/tmap).

[<img src="articles/area7.jpg" width="900"/>](articles/area7.jpg)
[<img src="man/figures/area7.jpg" width="900"/>](man/figures/area7.jpg)

`area7d`, `area8d` and `area9d` similar but for dark mode:.

[<img src="articles/area7d.jpg" width="900"/>](articles/area7d.jpg)
[<img src="man/figures/area7d.jpg" width="900"/>](man/figures/area7d.jpg)


`line7`, `line8` and `line9` are colors with good contrast against both black and white, and are also colorblind-friendly to some extent. So ideal for line graphs and scatter plots:

[<img src="articles/line7_wt.jpg" width="440"/>](articles/line7_wt.jpg)
[<img src="articles/line7_bk.jpg" width="440"/>](articles/line7_bk.jpg)
[<img src="man/figures/line7_wt.jpg" width="440"/>](man/figures/line7_wt.jpg)
[<img src="man/figures/line7_bk.jpg" width="440"/>](man/figures/line7_bk.jpg)

Finally `friendly7` ... `friendly13` are colorblind-friendly palettes (disregarding the other properties):

[<img src="articles/friendly13.jpg" width="900"/>](articles/friendly13.jpg)
[<img src="man/figures/friendly13.jpg" width="900"/>](man/figures/friendly13.jpg)



Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The main tool is a dashboard, which is started with:
c4a_gui()
```

[<img src="articles/cols4all2.jpg" width="900"/>](articles/cols4all2.jpg)
[<img src="man/figures/cols4all2.jpg" width="900"/>](man/figures/cols4all2.jpg)

What palettes are available? That is, by default; other palettes can be
added!
Expand Down Expand Up @@ -111,7 +111,7 @@ When we are looking for a fair categorical palette of seven colors that
is as color blind friendly as possible, then filter on “Fair”, and sort
by “Colorblind-friendly”:

[<img src="articles/cols4all_fair_sort_cbf.jpg" width="900"/>](articles/cols4all_fair_sort_cbf.jpg)
[<img src="man/figures/cols4all_fair_sort_cbf.jpg" width="900"/>](man/figures/cols4all_fair_sort_cbf.jpg)

This inspired us to develop our own palettes: see these `cols4all`
palettes below.
Expand All @@ -122,7 +122,7 @@ Say we need a diverging palette that is color blind friendly, and what
to choose one by eye. Then filter by “Colorblind-friendly” and sort by
“Hue Middle L” (the hue of the left wing):

[<img src="articles/cols4all_div.jpg" width="900"/>](articles/cols4all_div.jpg)
[<img src="man/figures/cols4all_div.jpg" width="900"/>](man/figures/cols4all_div.jpg)

Reverse sorting is also applied.

Expand All @@ -131,30 +131,30 @@ Reverse sorting is also applied.
We applied a basic heuristic to explore palettes that score well on a
mix of the properties named above

[<img src="articles/c4a_pals.jpg" width="900"/>](articles/c4a_pals.jpg)
[<img src="man/figures/c4a_pals.jpg" width="900"/>](man/figures/c4a_pals.jpg)

`area7`, `area8` and `area9` are fair, contain low pastel colors, and
are color-blind friendly (up to 7 colors). So ideal for maps and other
space-filling visualizations! These are used in
[https://github.com/r-tmap/tmap](%60tmap4%60).
[`tmap4`](https://github.com/r-tmap/tmap).

[<img src="articles/area7.jpg" width="900"/>](articles/area7.jpg)
[<img src="man/figures/area7.jpg" width="900"/>](man/figures/area7.jpg)

`area7d`, `area8d` and `area9d` similar but for dark mode:.

[<img src="articles/area7d.jpg" width="900"/>](articles/area7d.jpg)
[<img src="man/figures/area7d.jpg" width="900"/>](man/figures/area7d.jpg)

`line7`, `line8` and `line9` are colors with good contrast against both
black and white, and are also colorblind-friendly to some extent. So
ideal for line graphs and scatter plots:

[<img src="articles/line7_wt.jpg" width="440"/>](articles/line7_wt.jpg)
[<img src="articles/line7_bk.jpg" width="440"/>](articles/line7_bk.jpg)
[<img src="man/figures/line7_wt.jpg" width="440"/>](man/figures/line7_wt.jpg)
[<img src="man/figures/line7_bk.jpg" width="440"/>](man/figures/line7_bk.jpg)

Finally `friendly7``friendly13` are colorblind-friendly palettes
(disregarding the other properties):

[<img src="articles/friendly13.jpg" width="900"/>](articles/friendly13.jpg)
[<img src="man/figures/friendly13.jpg" width="900"/>](man/figures/friendly13.jpg)

## `ggplot2` integration

Expand Down
File renamed without changes
Binary file added man/figures/README-unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-unnamed-chunk-7-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/README-unnamed-chunk-7-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
56 changes: 28 additions & 28 deletions vignettes/articles/paper.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ library(cols4all)
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("cols4all2.jpg")
knitr::include_graphics("../../man/figures/cols4all2.jpg")
```

## Introduction
Expand Down Expand Up @@ -166,63 +166,63 @@ Palettes are organised by functional type. We distinguish the following types:
#| out.width = 400,
#| echo = FALSE
knitr::include_graphics("ex_cat.jpg")
knitr::include_graphics("../../man/figures/ex_cat.jpg")
```

```{r expals2, fig.cap = "Example of palette type: sequential"}
#| fig.alt = "Example of palette type: sequential",
#| out.width = 400,
#| echo = FALSE
knitr::include_graphics("ex_seq.jpg")
knitr::include_graphics("../../man/figures/ex_seq.jpg")
```

```{r expals3, fig.cap = "Example of palette type: diverging"}
#| fig.alt = "Example of palette type: diverging",
#| out.width = 400,
#| echo = FALSE
knitr::include_graphics("ex_div.jpg")
knitr::include_graphics("../../man/figures/ex_div.jpg")
```

```{r expals4, fig.cap = "Example of palette type: cyclic"}
#| fig.alt = "Example of palette type: cyclic",
#| out.width = 400,
#| echo = FALSE
knitr::include_graphics("ex_cyc.jpg")
knitr::include_graphics("../../man/figures/ex_cyc.jpg")
```

```{r expals5, fig.cap = "Example of palette type: bivariate (seq x seq)"}
#| fig.alt = "Example of palette type: bivariate (seq x seq)",
#| out.width = 200,
#| echo = FALSE
knitr::include_graphics("ex_bivs.jpg")
knitr::include_graphics("../../man/figures/ex_bivs.jpg")
```

```{r expals6, fig.cap = "Example of palette type: bivariate (seq x cat)"}
#| fig.alt = "Example of palette type: bivariate (seq x cat)",
#| out.width = 200,
#| echo = FALSE
knitr::include_graphics("ex_bivc.jpg")
knitr::include_graphics("../../man/figures/ex_bivc.jpg")
```

```{r expals7, fig.cap = "Example of palette type: bivariate (seq x div)"}
#| fig.alt = "Example of palette type: bivariate (seq x div)",
#| out.width = 200,
#| echo = FALSE
knitr::include_graphics("ex_bivd.jpg")
knitr::include_graphics("../../man/figures/ex_bivd.jpg")
```

```{r expals8, fig.cap = "Example of palette type: bivariate (seq x desaturated)"}
#| fig.alt = "Example of palette type: bivariate (seq x desaturated)",
#| out.width = 200,
#| echo = FALSE
knitr::include_graphics("ex_bivg.jpg")
knitr::include_graphics("../../man/figures/ex_bivg.jpg")
```


Expand Down Expand Up @@ -392,7 +392,7 @@ To aid decision making a palette is called fair if the fairness score is at leas
#| out.width = 300,
#| echo = FALSE
knitr::include_graphics("fairness.jpg")
knitr::include_graphics("../../man/figures/fairness.jpg")
```


Expand Down Expand Up @@ -441,7 +441,7 @@ For diverging palettes, we calculate the hue widths for both wings. If at least
#| out.width = 400,
#| echo = FALSE
knitr::include_graphics("necklace.jpg")
knitr::include_graphics("../../man/figures/necklace.jpg")
```


Expand All @@ -457,7 +457,7 @@ In the middle column two similarity matrices are shown, above for people with no
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("cbf_okabe.jpg")
knitr::include_graphics("../../man/figures/cbf_okabe.jpg")
```


Expand Down Expand Up @@ -486,7 +486,7 @@ Figure \@ref(fig:contrast) shows a bar chart of the contrast ratio values of the
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("contrast_powerbi_default.jpg")
knitr::include_graphics("../../man/figures/contrast_powerbi_default.jpg")
```


Expand All @@ -502,7 +502,7 @@ Several visual illusions could appear at equiluminance, such as that the eye has
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics(c("equi1.jpg", "equi2.jpg"))
knitr::include_graphics(c("../../man/figures/equi1.jpg", "../../man/figures/equi2.jpg"))
```


Expand Down Expand Up @@ -533,7 +533,7 @@ Figure \@ref(fig:3dblues) illustrates this illusion with a categorical map of th
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("3Dblues_map.jpg")
knitr::include_graphics("../../man/figures/3Dblues_map.jpg")
```


Expand Down Expand Up @@ -578,7 +578,7 @@ The variety of colors shown in the column headings are generated by the specifie
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("naming_tableau10.jpg")
knitr::include_graphics("../../man/figures/naming_tableau10.jpg")
```


Expand Down Expand Up @@ -610,7 +610,7 @@ The columns on the right-hand side of the colors include symbols on which the us
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("overview_seq2.jpg")
knitr::include_graphics("../../man/figures/overview_seq2.jpg")
```


Expand All @@ -619,7 +619,7 @@ knitr::include_graphics("overview_seq2.jpg")
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("overview_div.jpg")
knitr::include_graphics("../../man/figures/overview_div.jpg")
```


Expand All @@ -633,7 +633,7 @@ The properties fairness, hues, and vividness all use the HCL color space, and ar
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("hcl_carto_safe.jpg")
knitr::include_graphics("../../man/figures/hcl_carto_safe.jpg")
```


Expand All @@ -653,7 +653,7 @@ Fairness and color blind friendliness often present conflicting objectives. Many
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("cols4all_fair_sort_cbf.jpg")
knitr::include_graphics("../../man/figures/cols4all_fair_sort_cbf.jpg")
```


Expand All @@ -668,7 +668,7 @@ A severe issue that may induce visual bias for color blind people is illustrated
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("cols4all_matplotlib_spectral.jpg")
knitr::include_graphics("../../man/figures/cols4all_matplotlib_spectral.jpg")
```


Expand All @@ -680,7 +680,7 @@ Several spectral sequential palettes from the series \texttt{scico} @scico, \tex
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("cols4all_seq_spectral.jpg")
knitr::include_graphics("../../man/figures/cols4all_seq_spectral.jpg")
```


Expand All @@ -689,7 +689,7 @@ knitr::include_graphics("cols4all_seq_spectral.jpg")
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("cols4all_div.jpg")
knitr::include_graphics("../../man/figures/cols4all_div.jpg")
```


Expand Down Expand Up @@ -738,7 +738,7 @@ The used approach to find those palettes was the following:
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("c4a_pals.jpg")
knitr::include_graphics("../../man/figures/c4a_pals.jpg")
```


Expand All @@ -748,7 +748,7 @@ knitr::include_graphics("c4a_pals.jpg")
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("area7.jpg")
knitr::include_graphics("../../man/figures/area7.jpg")
```


Expand All @@ -757,7 +757,7 @@ knitr::include_graphics("area7.jpg")
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("area7d.jpg")
knitr::include_graphics("../../man/figures/area7d.jpg")
```


Expand All @@ -766,7 +766,7 @@ knitr::include_graphics("area7d.jpg")
#| out.width = 350,
#| echo = FALSE
knitr::include_graphics(c("line7_wt.jpg", "line7_bk.jpg"))
knitr::include_graphics(c("../../man/figures/line7_wt.jpg", "../../man/figures/line7_bk.jpg"))
```


Expand All @@ -775,7 +775,7 @@ knitr::include_graphics(c("line7_wt.jpg", "line7_bk.jpg"))
#| out.width = 700,
#| echo = FALSE
knitr::include_graphics("friendly13.jpg")
knitr::include_graphics("../../man/figures/friendly13.jpg")
```


Expand Down

0 comments on commit 7e7cdec

Please sign in to comment.