Commit 0e2836f1 authored by William F Godoy's avatar William F Godoy
Browse files

Add helperPlotBox

parent 6cff4491
import CSV
import DataFrames
using StatsPlots
function plot_boxplot(filename::String, label::String, initial::Bool=false)
df = CSV.File(filename) |> DataFrames.DataFrame
y1 = df[!,"main"]
y2 = df[!,"PR"]
if (initial == true)
boxplot([label label],
[y2 y1],
label=["PR" "main"],
ylims=(0, 600),
leg=true,
xlabel="Number of Experiments",
ylabel="LoadMD Wall-clock Time (s)"
)
else
boxplot!([label label],
[y2 y1],
label=["PR" "main"],
)
end
end
function plot_histo(filename::String)
df = CSV.File(filename) |> DataFrames.DataFrame
y1 = df[!,"main"]
y2 = df[!,"PR"]
histogram(y1, bins=100, alpha=0.3, label="main",
xlims=(0, 300), ylims=(0, 30), minorticks=10,
xlabel="LoadMD wall-clock time (s)",
ylabel="Number of occurrences (count)",
title="80 Experiments"
)
histogram!(y2, bins=100, alpha=0.3, label="PR")
end
function main()
# plot_boxplot("/home/wgodoy/runs/LoadMD/LoadMD80wc_analysis_sns.txt", "80", true)
# plot_boxplot("/home/wgodoy/runs/LoadMD/LoadMD180wc_analysis_sns.txt", "180")
plot_histo("/home/wgodoy/runs/LoadMD/LoadMD80wc_analysis_sns.txt")
# plot_histo("/home/wgodoy/runs/LoadMD/LoadMD180wc_analysis_sns.txt")
end
main()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment