plotTimings.Rd
Function to plot timings vs data sizes from the data frame returned by asymptoticTimings
plotTimings( data.df, titles = list("", ""), labels = list("Data size", "Runtime (in nanoseconds)"), point.alpha = 1, line.alpha = 1, point.color = "black", line.color = "black", point.size = 1.3, line.size = 0.7 )
data.df | A data frame composed of columns 'Timings' and 'Data sizes', which can be obtained by asymptoticTimings() |
---|---|
titles | A list of two elements consisting of strings for the plot title and subtitle. Optional, with default values set to empty strings. (no titles/subtitles) |
labels | A list of two elements containing strings for x and y labels respectively. Optional, with default values set to appropriate labels. |
point.alpha | A numeric value denoting transparency level (in the range 0 to 1) for point geometry. Optional, with the default value set to 1. (no transparentness) |
line.alpha | A numeric value denoting transparency level (in the range 0 to 1) for line geometry. Optional, with the default value set to 1. (no transparentness) |
point.color | A string specifying a known color or a representation in hexcode for point geometry. Optional, with the default color set as black. (Hex equivalent: #000000) |
line.color | A string specifying a known color or a representation in hexcode for line geometry. Optional, with the default color set as black. (Hex equivalent: #000000) |
point.size | A numeric value denoting the size of point geometry. Optional, with the default value set to (1.3). |
line.size | A numeric value denoting the size of line geometry. Optional, with the default value set to (0.7). |
A ggplot object.
For more information regarding its implementation or functionality/usage, please check https://anirban166.github.io//Plotters/
# Quantifying the runtimes for the substring function against a set of input data sizes: input.sizes = 10^seq(1, 4, by = 0.5) timings.df <- asymptoticTimings(substring(paste(rep("A", N), collapse = ""), 1:N, 1:N), input.sizes) # Plotting the trend between benchmarked timings and data sizes: plotTimings(timings.df)