Skip to content
Snippets Groups Projects
Commit 96034325 authored by Johannes Mey's avatar Johannes Mey
Browse files

update diagram printing

parent fa1e4339
No related branches found
No related tags found
No related merge requests found
...@@ -111,6 +111,7 @@ for (phase in phasesPrettified) { ...@@ -111,6 +111,7 @@ for (phase in phasesPrettified) {
# y axis labels # y axis labels
yaxis = nice_y_axis() yaxis = nice_y_axis()
ybreaks = yaxis$ybreaks ybreaks = yaxis$ybreaks
yminor_breaks = yaxis$yminor_breaks
ylabels = yaxis$ylabels ylabels = yaxis$ylabels
for (cpage in 1:6) { for (cpage in 1:6) {
...@@ -118,10 +119,19 @@ for (phase in phasesPrettified) { ...@@ -118,10 +119,19 @@ for (phase in phasesPrettified) {
aes(x = as.factor(Model), y = Time) + aes(x = as.factor(Model), y = Time) +
labs(title = paste("Individual query execution time,", phase, "phase"), x = "Model size\n#Elements", y = "Execution times [ms]") + labs(title = paste("Individual query execution time,", phase, "phase"), x = "Model size\n#Elements", y = "Execution times [ms]") +
geom_point(aes(col = Tool, shape = Tool), size = 2.0) + geom_point(aes(col = Tool, shape = Tool), size = 2.0) +
scale_shape_manual(values = seq(0, 15)) + # scale_shape_manual(values = seq(0, 15)) +
scale_shape_manual(values = c(0, 15, 1, 16, 2, 17, 4, 7)) +
scale_colour_manual(values = c(
"#56B4E9", "#56B4E9", # Sky blue - JastAdd NameLookup
"#009E73", "#009E73", # Bluish green - JastAdd Optimized
"#0072B2", "#0072B2", # Blue - JastAdd Specialized
"#E69F00", # Orange - TinkerGraph
"#D55E00", # Vermillion - VIATRA
"#F0E442", # Yellow
"#CC79A7")) +
geom_line(aes(col = Tool, group = Tool), size = 0.5) + geom_line(aes(col = Tool, group = Tool), size = 0.5) +
scale_x_discrete(breaks = xbreaks, labels = xlabels) + scale_x_discrete(breaks = xbreaks, labels = xlabels) +
scale_y_log10(breaks = ybreaks, labels = ylabels) + scale_y_log10(breaks = ybreaks, minor_breaks=yminor_breaks, labels = ylabels) +
facet_grid_paginate(~ Workload, nrow=1, ncol = 1, page=cpage, scale = "free") + facet_grid_paginate(~ Workload, nrow=1, ncol = 1, page=cpage, scale = "free") +
guides(color = guide_legend(ncol = 4)) + guides(color = guide_legend(ncol = 4)) +
theme_bw() + theme_bw() +
...@@ -132,12 +142,13 @@ for (phase in phasesPrettified) { ...@@ -132,12 +142,13 @@ for (phase in phasesPrettified) {
legend.title = element_blank(), legend.title = element_blank(),
legend.position = "bottom", legend.position = "bottom",
axis.text = element_text(size = 9) axis.text = element_text(size = 9)
#, panel.grid.minor = element_blank()
) )
print(p) print(p)
ggsave( ggsave(
plot = p, plot = p,
filename = paste("../diagrams/recent/individual-", phase.filename, "-",workloads[cpage], ".pdf", sep=""), filename = paste("../diagrams/recent/individual-", phase.filename, "-",workloads[cpage], ".pdf", sep=""),
width = 250, height = 150, units = "mm" width = 280, height = 210, units = "mm"
) )
} }
......
...@@ -2,17 +2,18 @@ nice_y_axis = function() { ...@@ -2,17 +2,18 @@ nice_y_axis = function() {
options(scipen=999) options(scipen=999)
# y axis labels # y axis labels
longticks = c(T, F, F, T, F, F, F, F, T) longticks = c(10)
shortticks = 2:10 shortticks = c(1,2,3,4,5,6,7,8,9)
range = -6:6 range = -6:6
ooms = 10^range ooms = 10^range
ybreaks = as.vector(shortticks %o% ooms) ybreaks = as.vector(longticks %o% ooms)
ylabels = as.character(ybreaks * longticks) yminor_breaks = as.vector(shortticks %o% ooms)
ylabels = as.character(ybreaks)
ylabels = gsub("^0$", "", ylabels) ylabels = gsub("^0$", "", ylabels)
list(ybreaks = ybreaks, ylabels = ylabels) list(ybreaks = ybreaks, yminor_breaks = yminor_breaks, ylabels = ylabels)
} }
get_extremes = function(df, phases) { get_extremes = function(df, phases) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment