mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 01:17:46 +00:00
First plot
This commit is contained in:
parent
a6e70544bb
commit
79ef212a8c
28 changed files with 305278 additions and 46324 deletions
|
@ -84,10 +84,25 @@
|
|||
#+END_SRC
|
||||
** R Scripts
|
||||
*** Load Data
|
||||
#+BEGIN_SRC R
|
||||
print("lkj")
|
||||
#+NAME: loadData
|
||||
#+BEGIN_SRC R :var genLog=logToCSV()
|
||||
library("tidyverse")
|
||||
|
||||
|
||||
getLabel=function(varName){
|
||||
labels=c(nbNodes="Node Number",nbSensors="Sensor Number",totalEnergy="Total Energy (J)")
|
||||
if(is.na(labels[varName])){
|
||||
return(varName)
|
||||
}
|
||||
return(labels[varName])
|
||||
}
|
||||
|
||||
# Load Data
|
||||
data=read_csv("logs/data.csv")
|
||||
ggplot(data,aes(x=nbNodes,y=totalEnergy))+geom_point()+geom_line()+xlab(getLabel("nbNodes"))+ylab(getLabel("totalEnergy"))
|
||||
ggsave("plot.png")
|
||||
#+END_SRC
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue