-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenergy_plot.R
More file actions
34 lines (27 loc) · 1.43 KB
/
energy_plot.R
File metadata and controls
34 lines (27 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library(ggthemes)
library(ggplot2)
library(dplyr)
energy_simulations <- read.csv("data/energy_simulation.csv")
energy_simulations_micro <- read.csv("data/energy_simulation_micro.csv")
aggregated_energy_core <- energy_simulations %>%
group_by(energy_core,Application) %>%
summarise(avg_energy = median(energy),
first_quant_energy = quantile(energy,0.25),
third_quant_energy = quantile(energy,0.75))
aggregated_energy_micro <- energy_simulations_micro %>%
group_by(Application) %>%
summarise(avg_energy = median(energy),
first_quant_energy = quantile(energy,0.25),
third_quant_energy = quantile(energy,0.75))
plot <- merge(aggregated_energy_core,aggregated_energy_micro,by = "Application")
plot$norm <- plot$avg_energy.x/plot$avg_energy.y
ggplot(plot, aes(x=energy_core, y=norm, color = Application)) +
geom_point() +
geom_smooth(col = "green", method = 'loess') +
geom_vline(xintercept = 0.9, linetype = "dotted") +
#geom_errorbar(aes(ymin=first_quant_energy/aggregated_energy_micro$first_quant_energy, ymax=third_quant_energy/aggregated_energy_micro$third_quant_energy), colour="black", width=.1) +
theme_fivethirtyeight() + scale_fill_pander() +
theme(axis.title = element_text()) +
ylab('Normalized Energy') + xlab("Power by Core [W]") +
annotate("text", x = 1.5, y = 3.5, label = "Threshold = 0.9 W/Core")
ggsave(filename = "graphs/energy_core.pdf", device = "pdf", scale = 0.8)