Commit 41369c9a authored by William F Godoy's avatar William F Godoy
Browse files

Add 4th column

parent c9b49413
......@@ -116,6 +116,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
Yd_Level0::Array{Float64,1} = []
caseIDs::Array{String,1} = []
caseDirs::Array{String,1} = []
outputDirs = helper_get_prefix_directories(extractor.outputPrefix)
......@@ -149,7 +150,10 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
push!( Yd, plotsSize)
# caseID
push!(caseIDs, string(caseID,"/",helper_get_relative_path(plotFileDir) ) )
push!(caseIDs, caseID )
# caseDir
push!(caseDirs, helper_get_relative_path(plotFileDir) )
counter = counter + 1
end
......@@ -158,7 +162,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
data = [(Xd,Yd)]
df::DataFrames.DataFrame = DataFrames.DataFrame( plots_cells = Xd, plots_size = Yd, caseID = caseIDs)
df::DataFrames.DataFrame = DataFrames.DataFrame( plots_cells = Xd, plots_size = Yd, caseID = caseIDs, caseDir = caseDirs)
println(df)
CSV.write("plot_size.csv", df, header=true)
......@@ -167,7 +171,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
end
# dead function
function _run_linear_model_plots_size(extractor::AmrexCastro, X::DataFrames.DataFrame)
outputDirs = helper_get_prefix_directories(extractor.outputPrefix)
......
......@@ -47,7 +47,7 @@ function FluxTrain(nepocs::Int32, X::Array{Float64,1}, Y::Array{Float64,1})
plot!(Xd', Yd_0', lc = :green, label = L"y_0")
plot!(Xd', Yd_nE', lc = :red, label = L"y_{n_\mathrm{E}}")
plot!(xlabel = L"x", ylabel = L"y", title = "Data for linear model")
gui()
end
......
import CSV
import DataFrames
using Plots
function plot_CSV_3col( filename::String )
df = CSV.File(filename) |> DataFrames.DataFrame
x = df[!,1]
y = df[!,2]
z = df[!,3]
display(Plots.scatter( x, y, groups = z, xaxis=:log, yaxis=:log,
legendfontsize=9,
legend = :outertopleft,
# [shapes], size, alpha
marker = ([:x :+ :star4 :vline :square :circle], 7, 1.0),
xlabel = "cumulative output ncells ( output_counter x ncells )",
ylabel = "cumulative output data size (bytes)",
title = "Amrex Castr Sedov hydro test output size",
size=(1200,850)
)
)
readline()
end
function main()
# modify this to the file path
filename = "/home/wgodoy/hdd_home/work/proxy_io/AmrexCastro/plot_size.csv"
plot_CSV_3col(filename)
end
main()
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