I have CSV data representing the time in nanoseconds for calls to my custom malloc(), realloc() and free() implementations. The data looks like this:
function,time malloc,331 malloc,386 malloc,326 malloc,321 malloc,321 malloc,316 malloc,331 malloc,337 malloc,311 malloc,322 realloc,502 realloc,662 realloc,536 realloc,477 realloc,441 realloc,552 realloc,477 realloc,437 realloc,447 realloc,542 free,321 free,327 free,321 free,402 free,357 free,386 free,417 free,361 free,341 free,431 malloc,341 malloc,316 malloc,326 malloc,326 malloc,311 ...
I need to plot this data using pgfplots to look something like (just a sketch):
My questions are:
- Is this possible?
- How do I get the bars so tightly packed? It would even be okay if they were completly adjacent. I may have 500-1000 data points (operations) to plot.
- How can I transform the "malloc", "realloc" and "free" in the data into red, green and blue?
Many thanks in advance!