Skip to content

Commit

Permalink
updated plots for paper
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad1991 committed Nov 25, 2024
1 parent 6800a89 commit e9390e8
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 35 deletions.
Binary file modified Paper/DecentFitParameterVariance/FigNr1.pdf
Binary file not shown.
Binary file modified Paper/DecentFitParameterVariance/FigNr1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Paper/DecentFitParameterVariance/FigNr1_Visualisation.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sig_plot <- function(case, path, legend = FALSE) {
data = errors_df,
aes(x = "", y = errors)
) +
labs(x = "", y = "rel. Error") +
labs(x = "", y = "MANE") +
theme(
axis.text = element_text(size = 5),
axis.title = element_text(size = 5),
Expand Down Expand Up @@ -75,7 +75,7 @@ sig_plot <- function(case, path, legend = FALSE) {
size = dotsize
) +
labs(x = names(df)[1]) +
scale_colour_manual(values = c("grey", "black", "darkred")) +
scale_colour_manual(values = c("grey", "#76acb0", "darkred")) +
theme(
legend.title = element_blank(),
axis.text = element_text(size = 5),
Expand Down
125 changes: 94 additions & 31 deletions Paper/Regions/3DPlots.R
Original file line number Diff line number Diff line change
@@ -1,82 +1,145 @@
library(plot3D)

png("DBA.png", width = 1200, height = 2000)
load("DBA_3D.RData")

z <- matrix(new_params$errors, nrow = length(KaHD), ncol = length(IHD))
png("GDA.png", width = 1200, height = 2000)
load("GDA_3D.RData")
z <- matrix(new_params$errors, nrow = length(KaHG), ncol = length(IHD))
hist3D(
x = KaHD, y = IHD, z = z,
col = viridis::viridis(30),
xlab = "Ka(HD) [1/M]", ylab = "I(HD) [1/M]", zlab = "rel. Error",
x = KaHG, y = IHD, z = z,
col = viridis::viridis(20),
# xlab = "Ka(HG) [1/M]", ylab = "I(HD) [1/M]", zlab = "MANE",
phi = 50,
cex.lab = 3,
cex.lab = 0.000001,
font.lab = 2,
font.lab = 2,
font.axis = 2,
cex.axis = 1.0,
cex.axis = 2.0,
nticks = 10,
ticktype = "detailed",
colkey = list(
side = 1,
length = 0.25,
width = 1,
dist = -0.1,
dist = -0.2,
cex.clab = 2,
cex.axis = 1.75,
font.axis = 2
)
)
text3D(
x = max(KaHG) + 6 * 10^3, y = max(IHD) * 0.8, z = -1,
phi = 50,
labels = "I(HD) [1/M]", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 55
)
text3D(
x = max(KaHG) / 1.5, y = min(IHD) - 2.5 * 10^7, z = -5,
phi = 50,
labels = "Ka(HG) [1/M]", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 320
)
text3D(
x = min(KaHG) - 10000, y = min(IHD) - 10^7, z = max(new_params$errors) * 0.4,
phi = 50,
labels = "MANE", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 295
)
dev.off()


png("IDA.png", width = 1200, height = 2000)
load("IDA_3D.RData")
z <- matrix(new_params$errors, nrow = length(KaHG), ncol = length(IHD))
png("DBA.png", width = 1200, height = 2000)
load("DBA_3D.RData")
z <- matrix(new_params$errors, nrow = length(KaHD), ncol = length(IHD))
hist3D(
x = KaHG, y = IHD, z = z,
col = viridis::viridis(20),
xlab = "Ka(HG) [1/M]", ylab = "I(HD) [1/M]", zlab = "rel. Error",
x = KaHD, y = IHD, z = z,
col = viridis::viridis(30),
# xlab = "Ka(HD) [1/M]", ylab = "I(HD) [1/M]", zlab = "MANE",
phi = 50,
cex.lab = 2,
font.lab = 2,
cex.lab = 3,
font.lab = 2,
cex.lab = 0.0001,
font.axis = 2,
cex.axis = 1.0,
cex.axis = 2.0,
ticktype = "detailed",
nticks = 10,
colkey = list(
side = 1,
length = 0.25,
width = 1,
dist = -0.1,
dist = -0.25,
cex.clab = 2,
cex.axis = 1.75,
font.axis = 2
)
)
text3D(
x = max(KaHD) + 600, y = (max(IHD) / 2) - 100, z = -5,
phi = 50,
labels = "I(HD) [1/M]", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 55
)
text3D(
x = max(KaHD) / 2, y = min(IHD) - 5 * 10^7, z = -5,
phi = 50,
labels = "Ka(HD) [1/M]", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 320
)
text3D(
x = min(KaHD) / 2, y = min(IHD) - 5 * 10^7, z = max(new_params$errors) / 2,
phi = 50,
labels = "MANE", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 295
)
dev.off()

png("GDA.png", width = 1200, height = 2000)
load("GDA_3D.RData")

png("IDA.png", width = 1200, height = 2000)
load("IDA_3D.RData")
z <- matrix(new_params$errors, nrow = length(KaHG), ncol = length(IHD))
hist3D(
x = KaHG, y = IHD, z = z,
col = viridis::viridis(20),
xlab = "Ka(HG) [1/M]", ylab = "I(HD) [1/M]", zlab = "rel. Error",
# xlab = "Ka(HG) [1/M]", ylab = "I(HD) [1/M]", zlab = "MANE",
phi = 50,
cex.lab = 2,
font.lab = 2,
cex.lab = 3,
cex.lab = 0.00001,
font.lab = 2,
font.axis = 2,
cex.axis = 1.0,
cex.axis = 1.8,
ticktype = "detailed",
nticks = 10,
colkey = list(
side = 1,
length = 0.25,
width = 1,
dist = -0.1,
dist = -0.2,
cex.clab = 2,
cex.axis = 1.75,
font.axis = 2
)
)
text3D(
x = max(KaHG) + 2 * 10^7, y = max(IHD) * 0.8, z = -1,
phi = 50,
labels = "I(HD) [1/M]", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 55
)
text3D(
x = max(KaHG) / 1.5, y = min(IHD) - 5 * 10^7, z = -5,
phi = 50,
labels = "Ka(HG) [1/M]", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 320
)
text3D(
x = min(KaHG), y = min(IHD) - 10^8, z = max(new_params$errors) * 0.7,
phi = 50,
labels = "MANE", col = "black",
add = TRUE, cex = 2.5, font = 2,
srt = 295
)
dev.off()


2 changes: 1 addition & 1 deletion Paper/Regions/ContourPlots.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ create_contour_plot <- function(case, params, env, pi) {
geom_contour_filled(binwidth = 0.5) +
labs(
x = names[pi[1]],
y = names[pi[2]], fill = "rel. Error interval"
y = names[pi[2]], fill = "MANE"
) +
theme(
legend.position = "bottom",
Expand Down
Binary file modified Paper/Regions/ContourPlots.RData
Binary file not shown.
Binary file modified Paper/Regions/DBA.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 Paper/Regions/FigNr3Part1.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 Paper/Regions/FigNr3Part2.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 Paper/Regions/GDA.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 Paper/Regions/IDA.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Paper/Sensitivity/ErrorsVsImportantParams.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ create_single_param_plots <- function(case, params, env, lb, ub) {
df <- data.frame(disturbed_param = disturbed_param, errors = errors)
ggplot(data = df, aes(x = disturbed_param, y = errors)) +
geom_point() +
labs(x = names[idx], y = "rel. Error")
labs(x = names[idx], y = "MANE")
})
plot_grid(plotlist = plots)
}
Expand Down
Binary file modified Paper/Sensitivity/ErrorsVsImportantParams.RData
Binary file not shown.
Binary file modified Paper/Sensitivity/FigNr2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e9390e8

Please sign in to comment.