0

I'm stating using ggplot2. Here is my first code to display data from a csv file

w <- read.csv(file="test.csv", head=TRUE, sep=",")
p <- ggplot(data=w, aes(x=start, y=current, color=cpu))
p + layer(geom="point", geom_params=list(size=2))

Here is a part of the file

start,end,active,duration,current,previous,cpu,arg1,arg2,arg3,arg4,arg5,arg6,
525255,0,0,0,__sto,1756,1757,0,0,0,0,0,0,
525292,525306,14,14,s_w,1756,0,0,1,0x36cd9000,29,0x00000000,29,
525313,525317,4,4,s_w,1756,0,0,1,0x36cd9000,27,0x00000000,27,
525323,0,0,0,__sto,1751,1756,0,0,0,0,0,0,

So to run it I followed these require steps

1- install the ggplot2 package

install.packages("ggplot2")

2- load the ggplot2 library into the R session

library("ggplot2")

3- run the code which is store in the file trace.r

source("trace.r")

But nothing is display.

Any idea about what is missing will be appreciate

Fopa Léon Constantin
  • 11,863
  • 8
  • 48
  • 82

0 Answers0