rdata-visualizationns-3ndnsim

Plotting graph from Text file using R


I am using an NS3 based simulator called NDNsim. I can generate certain trace files that can be used to analyze performance, etc. However I need to visualize the data generated.

I am a complete Novice with R, and would like a way to visualize. Here is how the output looks from which I would to plot. Any help is appreciated.


Solution

  • It's pretty difficult to know what you're looking for, since you have almost 50,000 measurements across 9 variables. Here's one way of getting a lot of that information on the screen:

    df <- read.table(paste0("https://gist.githubusercontent.com/wuodland/",
                            "9b2c76650ea37459f869c59d5f5f76ea/raw/",
                            "6131919c105c95f8ba6967457663b9c37779756a/rate.txt"),
                     header = TRUE)
    
    library(ggplot2)
    
    ggplot(df, aes(x = Time, y = Kilobytes, color = Type)) + 
      geom_line() + 
      facet_wrap(~FaceDescr)
    

    enter image description here