Skip to content

Commit

Permalink
3rd revision
Browse files Browse the repository at this point in the history
  • Loading branch information
PMassicotte committed Nov 20, 2018
1 parent 842793e commit 30d2a2d
Show file tree
Hide file tree
Showing 54 changed files with 80,097 additions and 241 deletions.
6 changes: 3 additions & 3 deletions R/fig1.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ p1 <- ggplot() +
# scale_color_brewer(palette = "BuPu") +
labs(fill = "") +
labs(color = "Sampling\ndistance (m)") +
xlab("x-distance (m)") +
ylab("y-distance (m)") +
xlab(bquote(italic(x)*"-distance (m)")) +
ylab(bquote(italic(y)*"-distance (m)")) +
geom_segment(data = configuration, aes(x = 0, y = 0, xend = x, yend = y, group = radius), size = 0.25) +
geom_label(data = configuration, aes(x = x, y = y, label = sprintf("%2.0f%% melt pond cover", radius * 100)), hjust = 0, label.size = 0, nudge_x = 1, size = 2, label.padding = unit(0.05, "lines")) +
guides(color = guide_legend(
Expand Down Expand Up @@ -97,7 +97,7 @@ p2 <- ggplot() +
annotate("segment", x = -75, xend = -65, y = 0, yend = -10, lty = 1, size = 0.25, arrow = arrow(length = unit(1.5, "mm")), color = "orange") +

annotate("text", x = -110, y = -100, label = "Homogeneous water column:", size = 3.5, hjust = 0, fontface = 2, family = "IBM Plex Sans Light") +
annotate("text", x = -110, y = -110, label = expression("a = b = 0.05"*m^{-1}), size = 3, hjust = 0, family = "IBM Plex Sans Light") +
annotate("text", x = -110, y = -110, label = expression(italic(a)*"="*italic(b)*"="*0.05*m^{-1}), size = 3, hjust = 0, family = "IBM Plex Sans Light", parse = TRUE) +
annotate("text", x = -110, y = -120, label = "VSF: Fourrier-Forand 3%", size = 3, hjust = 0, family = "IBM Plex Sans Light") +

theme(panel.grid = element_blank()) +
Expand Down
4 changes: 2 additions & 2 deletions R/fig3.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ p1 <- df %>%
geom_path() +
scale_y_reverse() +
ylab("Depth (m)") +
xlab(bquote(E[d]~"("*mu*W~cm^{-2}*")")) +
xlab(bquote(italic(E[d])~"("*mu*W~cm^{-2}*")")) +
labs(color = "Wavelengths (nm)") +
theme(legend.position = "none") +
guides(color = guide_legend(
Expand All @@ -46,7 +46,7 @@ p2 <- df %>%
geom_path() +
scale_y_reverse() +
ylab("Depth (m)") +
xlab(bquote(L[u]~"("*mu*W~cm^{-2}~sr^{-1}*")")) +
xlab(bquote(italic(L[u])~"("*mu*W~cm^{-2}~sr^{-1}*")")) +
labs(color = "Wavelengths (nm)") +
theme(
legend.position = c(0.99, 0.01),
Expand Down
4 changes: 2 additions & 2 deletions R/fig4.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ p <- df %>%
breaks = c("edz", "luz"),
values = c(1, 2),
labels = c(
bquote(Downwelling~irradiance~(E[d])),
bquote(Upwelling~radiance~(L[u]))
bquote(Downward~irradiance~(italic(E[d]))),
bquote(Upward~radiance~(italic(L[u])))
)
) +
guides(colour = FALSE)
Expand Down
8 changes: 4 additions & 4 deletions R/fig5.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ p <- k2 %>%
geom_point(aes(color = factor(wavelength)), size = 1) +
geom_smooth(method = "lm", se = FALSE, size = 0.5, color = "red") +
geom_abline(slope = 1, intercept = 0, lty = 2, color = "grey50") +
xlab(bquote(K[Lu]~(m^{-1}))) +
ylab(bquote(K[d]~(m^{-1}))) +
xlab(bquote(italic(K[Lu])~(m^{-1}))) +
ylab(bquote(italic(K[d])~(m^{-1}))) +
labs(color = "Wavelength (nm)") +
scale_color_manual(values = color) +
facet_wrap(~depth_range, scales = "free", ncol = 3, labeller = as_labeller(appender)) +
Expand Down Expand Up @@ -95,8 +95,8 @@ p <- k2 %>%
geom_point(aes(color = factor(wavelength)), size = 1) +
geom_smooth(method = "lm", se = FALSE, size = 0.5, color = "red") +
geom_abline(slope = 1, intercept = 0, lty = 2, color = "grey50") +
xlab(bquote(K[Lu]~(m^{-1}))) +
ylab(bquote(K[d]~(m^{-1}))) +
xlab(bquote(italic(K[Lu])~(m^{-1}))) +
ylab(bquote(italic(K[d])~(m^{-1}))) +
labs(color = "Wavelength (nm)") +
scale_color_manual(values = color) +
facet_wrap(~depth_range, scales = "free", ncol = 3) +
Expand Down
2 changes: 1 addition & 1 deletion R/fig6.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ iso <- df %>%
drop_na()

p <- df %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Downward~irradiance~(E[d])", "Upward~radiance~(L[u])")) %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Downward~irradiance~(italic(E[d]))", "Upward~radiance~(italic(L[u]))")) %>%
ggplot(aes(x = x, y = y, fill = z, z = z)) +
geom_raster() +
scale_y_reverse(expand = c(0, 0), name = "Depth (m)") +
Expand Down
22 changes: 11 additions & 11 deletions R/fig7-11.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ p1 <- simulo %>%
theme(legend.key.size = unit(0.75, "lines")) +
# theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
theme(legend.position = "none") +
xlab("Downward irradiance (a.u.)")
xlab("Downward irradiance")

p2 <- simulo %>%
filter(source == "Radiance (Lu)") %>%
Expand All @@ -74,7 +74,7 @@ p2 <- simulo %>%
theme(legend.title = element_text(size = 8), legend.text = element_text(size = 6)) +
theme(legend.key.size = unit(0.75, "lines")) +
# theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
xlab("Upward radiance (a.u.)")
xlab("Upward radiance")

p <- p1 +
p2 +
Expand Down Expand Up @@ -195,7 +195,7 @@ p1 <- averaged_simulo %>%
theme(legend.key.size = unit(0.5, "lines")) +
scale_x_continuous(labels = scientific_10x) +
ylab("Depth (m)") +
xlab("Downward irradiance (a.u.)") +
xlab("Downward irradiance") +
theme(axis.text.x = element_text(angle = 35, hjust = 1)) +
theme(legend.position = "none")

Expand All @@ -211,7 +211,7 @@ p2 <- averaged_simulo %>%
theme(legend.key.size = unit(0.5, "lines")) +
scale_x_continuous(labels = scientific_10x) +
ylab("Depth (m)") +
xlab("Upward radiance (a.u.)") +
xlab("Upward radiance") +
theme(axis.text.x = element_text(angle = 35, hjust = 1)) +
theme(legend.margin = margin(t = 1, unit = 'cm'))

Expand Down Expand Up @@ -247,12 +247,12 @@ p <- k %>%
xlab("Distance from the center of the melt pond (m)") +
ylab(bquote("Attenuation coefficient"~(m^{-1}))) +
theme(legend.position = c(0.95, 0.95), legend.justification = c(1, 1)) +
labs(color = "Radiometric quantity") +
scale_color_manual(
breaks = c("Irradiance (Ed)", "Radiance (Lu)"),
values = RColorBrewer::brewer.pal(3, "Set1"),
labels = c(bquote(Downward~irradiance~(E[d])), bquote(Upward~radiance~(L[u])))
)
labels = c(bquote(italic(K[d])), bquote(italic(K[Lu])))
) +
theme(legend.title = element_blank())

ggsave("graphs/fig9.pdf", width = 5.5, height = 4, device = cairo_pdf)

Expand Down Expand Up @@ -290,10 +290,10 @@ labels <- c(
)

predicted_light2 <- predicted_light %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Propagated~with~K[d]", "Propagated~with~K[Lu]"))
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Propagated~with~italic(K[d])", "Propagated~with~italic(K[Lu])"))

p <- reference_profile %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Propagated~with~K[d]", "Propagated~with~K[Lu]")) %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Propagated~with~italic(K[d])", "Propagated~with~italic(K[Lu])")) %>%
ggplot(aes(x = value, y = depth)) +
facet_grid(range ~ source2, scales = "free", labeller = labeller(source2 = label_parsed, range = label_value)) +
scale_y_reverse() +
Expand All @@ -302,7 +302,7 @@ p <- reference_profile %>%
labs(color = str_wrap("Distance from the center of the melt pond (m)", 20)) +
scale_x_continuous(labels = scientific_10x, breaks = c(0, 3, 6)*1e6, limits = c(0, NA), expand = c(0.15, 0)) +
ylab("Depth (m)") +
xlab("Downward irradiance (a.u.)") +
xlab("Downward irradiance") +
theme(strip.text.y = element_text(size = 8)) +
guides(col = guide_legend(ncol = 2)) +
theme_bw(base_family = "IBM Plex Sans Light")
Expand Down Expand Up @@ -330,7 +330,7 @@ res <- left_join(int1, int2, by = c("source", "range")) %>%
p <- res %>%
spread(type, integral) %>%
mutate(relative_error = (reference - predicted) / reference) %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Propagated~with~K[d]", "Propagated~with~K[Lu]")) %>%
mutate(source2 = ifelse(source == "Irradiance (Ed)", "Propagated~with~italic(K[d])", "Propagated~with~italic(K[Lu])")) %>%
ggplot(aes(x = mid_distance, y = relative_error, color = range)) +
geom_line() +
# geom_point(show.legend = FALSE) +
Expand Down
6 changes: 3 additions & 3 deletions R/supp_fig_4-6.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ p1 <- res2 %>%
geom_point() +
geom_ribbon(aes(ymin = r_squared_mean - r_squared_sd, ymax = r_squared_mean + r_squared_sd), alpha = 0.25) +
xlab("Wavelength (nm)") +
ylab(bquote(atop("Determination", "coefficient" ~ "("*R ^ 2*")"))) +
ylab(bquote(atop("Determination", "coefficient" ~ "("*italic(R^2)*")"))) +
scale_x_continuous(breaks = seq(400, 700, by = 50))

p2 <- res2 %>%
Expand Down Expand Up @@ -124,8 +124,8 @@ p <- df %>%
geom_point(size = 0.25, alpha = 0.5) +
facet_wrap(~simulation_type) +
scale_color_manual(values = color) +
ylab(bquote(K[d]~(m^{-1}))) +
xlab(bquote(K[Lu]~(m^{-1}))) +
ylab(bquote(italic(K[d])~(m^{-1}))) +
xlab(bquote(italic(K[Lu])~(m^{-1}))) +
labs(color = "Wavelength (nm)") +
geom_abline(lty = 2, size = 0.25) +
guides(color = guide_legend(
Expand Down

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 30d2a2d

Please sign in to comment.