Added black and white plots for print version of thesis

This commit is contained in:
Nora Wickelmaier 2024-03-30 16:43:09 +01:00
parent e40ed45848
commit 3e271848eb
2 changed files with 63 additions and 2 deletions

View File

@ -8,7 +8,7 @@
# output: ../../thesis/figures/freq-traces.pdf
# ../../thesis/figures/freq-traces_powerlaw.pdf
#
# last mod: 2024-03-26
# last mod: 2024-03-30
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code")
@ -68,6 +68,20 @@ legend("topright", paste0("Proportion of traces only occurring once: ",
dev.off()
# Black and white
pdf("../../thesis/figures/freq-traces_powerlaw_bw.pdf", height = 3.375,
width = 3.375, pointsize = 10)
par(mai = c(.6,.6,.1,.1), mgp = c(2.4, 1, 0))
plot(x, y, log = "xy", xlab = "Absolute Frequency of Traces",
ylab = "Frequency", pch = 16, col = rgb(0.3, 0.3, 0.3, 0.5))
lines(x, pre, col = "#434F4F")
legend("topright", paste0("Proportion of traces only occurring once: ",
round(tab[1] / nrow(tr), 2)), cex = .7, bty = "n")
dev.off()
# Look at individual traces as examples
tr[trace_varied == 5 & trace_length > 50, ]
# --> every variant exists only once, of course
@ -123,6 +137,19 @@ legend("topright", paste0("Proportion of traces only occurring once: ",
dev.off()
# Black and white
pdf("../../thesis/figures/freq-traces_powerlaw_2019_bw.pdf", height = 3.375,
width = 3.375, pointsize = 10)
par(mai = c(.6,.6,.1,.1), mgp = c(2.4, 1, 0))
plot(x, y, log = "xy", xlab = "Absolute Frequency of Traces",
ylab = "Frequency", pch = 16, col = rgb(0.3, 0.3, 0.3, 0.5))
lines(x, pre, col = "#434F4F")
legend("topright", paste0("Proportion of traces only occurring once: ",
round(tab[1] / nrow(tr), 2)), cex = .7, bty = "n")
dev.off()
# Look at individual traces as examples
tr[trace_varied == 5 & trace_length > 50, ]
# --> every variant exists only once, of course

View File

@ -10,7 +10,7 @@
# ../../thesis/figures/dfg_cases_cluster4_R.pdf
# ../../thesis/figures/dfg_cases_cluster5_R.pdf
#
# last mod: 2024-03-27
# last mod: 2024-03-30
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code")
@ -79,6 +79,40 @@ for (i in 1:5) {
file_type = "pdf")
}
## Black and white
for (i in 1:5) {
alog <- bupaR::activitylog(dat[dat$cluster == i, ],
case_id = "case",
activity_id = "item",
resource_id = "path",
timestamps = c("start", "complete"))
if (i %in% c(4, 5)) {
dfg <- processmapR::process_map(edeaR::filter_infrequent_flows(alog, min_n = ns[i]),
type_nodes = processmapR::frequency("relative", color_scale = "Greys"),
sec_nodes = processmapR::frequency("absolute"),
type_edges = processmapR::frequency("relative", color_edges = "black"),
sec_edges = processmapR::frequency("absolute"),
render = FALSE)
} else {
dfg <- processmapR::process_map(edeaR::filter_infrequent_flows(alog, min_n = ns[i]),
type_nodes = processmapR::frequency("relative", color_scale = "Greys"),
sec_nodes = processmapR::frequency("absolute"),
type_edges = processmapR::frequency("relative", color_edges = "black"),
sec_edges = processmapR::frequency("absolute"),
rankdir = "TB",
render = FALSE)
}
processmapR::export_map(dfg,
file_name = paste0("../../thesis/figures/dfg_cases_cluster_", cl_names[i], "_R_bw.pdf"),
file_type = "pdf")
}
# What data is used and how many traces are unique
tr_unique <- numeric(5)