Skip to content

Commit

Permalink
Merge branch 'separate-palettes' into 'master'
Browse files Browse the repository at this point in the history
Separate palettes

See merge request WEEL_grp/study-area-figures!5
  • Loading branch information
robitalec committed Apr 16, 2020
2 parents c595712 + 0b31525 commit 1718557
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 31 deletions.
12 changes: 12 additions & 0 deletions R/00-palette.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Palette - Study area figure ====
# Alec Robitaille

watercol <- '#c3e2ec'
islandcol <- '#d0c2a9'
coastcol <- '#82796a'
roadcol <- '#666666'
gridcol <- '#323232'

parkcol <- '#9fb5a0'
parkboundcol <- '#4c5d3a'

7 changes: 1 addition & 6 deletions R/02-fogo-island-figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ utm <- st_crs('+proj=utm +zone=21 ellps=WGS84')

### Theme ----
# Colors
watercol <- '#c3e2ec'
islandcol <- '#d0c2a9'
coastcol <- '#82796a'
roadcol <- '#666666'
gridcol <- '#323232'

source('R/00-palette.R')

roadcols <- data.table(highway = c("primary", "secondary", "residential",
"service", "unclassified", "footway"))
Expand Down
4 changes: 1 addition & 3 deletions R/04-newfoundland-figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ utm <- st_crs('+proj=utm +zone=21 ellps=WGS84')

### Theme ----
# Colors
watercol <- '#c3e2ec'
islandcol <- '#d0c2a9'
coastcol <- '#82796a'
source('R/00-palette.R')

# Theme
themeMap <- theme(panel.border = element_rect(size = 1, fill = NA),
Expand Down
7 changes: 1 addition & 6 deletions R/05-fogo-inset-newfoundland-figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ utmBB <- data.table(dtbb[, project(cbind(x, y), utm$proj4string)])

### Theme ----
# Colors
watercol <- '#c3e2ec'
islandcol <- '#d0c2a9'
coastcol <- '#82796a'
roadcol <- '#666666'
gridcol <- '#323232'

source('R/00-palette.R')

roadcols <- data.table(highway = c("primary", "secondary", "residential",
"service", "unclassified", "footway"))
Expand Down
9 changes: 1 addition & 8 deletions R/07-terra-nova-figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,7 @@ highway <- roads[roads$highway %in% selroads,]

### Theme ----
# Colors
watercol <- '#c3e2ec'
islandcol <- '#d0c2a9'
coastcol <- '#82796a'
roadcol <- '#666666'
gridcol <- '#323232'

parkcol <- '#9fb5a0'
parkboundcol <- '#4c5d3a'
source('R/00-palette.R')

roadcols <- data.table(highway = selroads)
roadcols[, cols := gray.colors(.N, start = 0.1, end = 0.4)]
Expand Down
9 changes: 1 addition & 8 deletions R/08-terra-nova-buns-figure.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,7 @@ highway <- roads[roads$highway %in% selroads,]

### Theme ----
# Colors
watercol <- '#c3e2ec'
islandcol <- '#d0c2a9'
coastcol <- '#82796a'
roadcol <- '#666666'
gridcol <- '#323232'

parkcol <- '#9fb5a0'
parkboundcol <- '#4c5d3a'
source('R/00-palette.R')

roadcols <- data.table(highway = selroads)
roadcols[, cols := gray.colors(.N, start = 0.1, end = 0.4)]
Expand Down
Binary file modified graphics/04-newfoundland.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 modified graphics/05-fogo-inset-nl.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 modified graphics/08-terra-nova-buns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions run-figures.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
for fig in R/*figure.R ; do
echo "Now running $fig"
Rscript $fig
done
rm Rplots.pdf

0 comments on commit 1718557

Please sign in to comment.