Update plot

This commit is contained in:
Loic Guegan 2021-01-31 18:39:22 +01:00
parent cf27e4a3ef
commit f415e409d8
3 changed files with 3 additions and 5 deletions

View file

@ -1222,14 +1222,13 @@ Our usecase: for one sensor
# Plot
p=ggplot(fakeData)+geom_bar(position="dodge2",colour="black",aes(x=sensorsNumber,y=energy,fill=type),stat="identity")+
xlab("Sensors Number")+ylab("Power Consumption (W)")+guides(fill=guide_legend(title="System Part"))
xlab("Number of Sensors")+ylab("Power Consumption (W)")+guides(fill=guide_legend(title="System Part"))
p=applyTheme(p)+theme(text = element_text(size=16))
ggsave("plots/final.png",dpi=90,width=8,height=5.5)
write.csv(last_plot()$data,file=paste0("/home/loic/aa",".csv"))
#+END_SRC
#+RESULTS:
[[file:plots/final.png]]
@ -1341,15 +1340,14 @@ Our usecase: for one sensor
data=data%>%group_by(sendInterval)%>%mutate(avgEnergy=mean(energy))%>%ungroup()
print(data)
p=ggplot(data,aes(x=time, y=energy)) + geom_line()+facet_wrap(~sendInterval)+expand_limits(y=c(0,40))+ylab("Server power consumption (W)")+
p=ggplot(data,aes(x=time, y=energy)) + geom_line()+facet_wrap(~sendInterval,ncol=1)+expand_limits(y=c(0,40))+ylab("Server power consumption (W)")+
xlab("Experiment Time (s)")+geom_hline(aes(yintercept=avgEnergy),color="Red",size=1.0)
p=applyTheme(p)
ggsave("plots/sendInterval-cloud.png",dpi=120,height=3,width=6)
ggsave("plots/sendInterval-cloud.png",dpi=120,height=6,width=8)
#+END_SRC
#+RESULTS:
[[file:plots/sendInterval-cloud.png]]
* Emacs settings :noexport:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 120 KiB