-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
200 lines (125 loc) · 3.77 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# Rdune <img src="man/figures/logo.jpg" align="right" width="120" />
<!-- badges: start -->
[](https://github.com/nvietto/Rdune/actions/workflows/R-CMD-check.yaml)
[](https://CRAN.R-project.org/package=Rdune)
[](https://cran.r-project.org/package=Rdune)
<!-- badges: end -->
The {Rdune} package offers a collection of color palettes inspired by 'Dune', designed for use in data visualizations and graphics with {ggplot2}.
The structure of the code and creative inspiration were drawn from the [{PrettyCols}](https://github.com/nrennie/PrettyCols), [{wesanderson}](https://github.com/karthik/wesanderson), [{MetBrewer}](https://github.com/BlakeRMills/MetBrewer), [{PNWColors}](https://github.com/jakelawlor/PNWColors) packages.
Colors were selected using [{eyedroppeR}](https://github.com/doehm/eyedroppeR).
## Installation
{Rdune} is available on CRAN. Install using:
``` r
install.packages("Rdune")
```
Or you can install the development version of Rdune from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("nvietto/Rdune")
```
## How to use
```{r example}
library(Rdune)
# See all palettes
names(dune_palettes)
```
## View palette
```{r, fig.height = 2}
pal <- dune_palette("atreides")
print.palette(pal)
```
## Examples
### "May thy knife chip and shatter"
<p align="center">
<img src="man/figures/maythyknifechipandshatter.jpg" height="300" >
</p>
```{r, example1, fig.height=3}
library(ggplot2)
ggplot(
data = iris,
mapping = aes(x = Sepal.Width, y = Sepal.Length, color = Species)
) +
geom_point(size = 2) +
scale_color_dune_d(name = "maythyknifechipandshatter")
```
### House Atreides
<p align="center">
<img src="man/figures/Atreides3.jpg" height="300" >
</p>
```{r, example2, fig.height=3}
library(ggplot2)
ggplot(
data.frame(x = rnorm(1000), y = rnorm(1000)),
aes(x = x, y = y)
) +
geom_hex() +
theme_minimal() +
scale_fill_dune_c(name = "atreides3") +
labs(x = "X-axis", y = "Y-axis", fill = "Legend")
```
## Palettes
### Arrakis
<p align="center">
<img src="man/figures/Arrakis.jpg" height="300" >
</p>
### House Atreides
<p align="center">
<img src="man/figures/Atreides.jpg" height="300">
</p>
<p align="center">
<img src="man/figures/Atreides2.jpg" height="300">
</p>
<p align="center">
<img src="man/figures/Atreides3.jpg" height="300">
</p>
<p align="center">
<img src="man/figures/Atreides4.jpg" height="300">
</p>
### Bene Gesserit
<p align="center">
<img src="man/figures/bene_gesserit.jpg" height="300">
</p>
### House Corrino
<p align="center">
<img src="man/figures/corrino.jpg" height="300" >
</p>
### Fremen
<p align="center">
<img src="man/figures/fermen.jpg" height="300" >
</p>
<p align="center">
<img src="man/figures/fermen2.jpg" height="300" >
</p>
### House Harkonnen
<p align="center">
<img src="man/figures/harkonnen.jpg" height="300" >
</p>
<p align="center">
<img src="man/figures/harkonnen2.jpg" height="300" >
</p>
<p align="center">
<img src="man/figures/harkonnen3.jpg" height="300" >
</p>
<p align="center">
<img src="man/figures/harkonnen4.jpg" height="300" >
</p>
### "May thy knife chip and shatter"
<p align="center">
<img src="man/figures/maythyknifechipandshatter.jpg" height="300" >
</p>
### Sandworm
<p align="center">
<img src="man/figures/sandworm.jpg" height="300" >
</p>