diff --git a/README.md b/README.md index e107363..eb7bfeb 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ The directory extracted from the above zip file contains two subdirectories: tax The generated figures are stored in the 'figures-paper' directory. -*Example usage*: python plot_script_main figure_8 +*Example usage*: python plot_script_main.py figure_8 This takes the required input from the 'results-paper' directory, generates Figure 8 of the paper, and stores it in the 'figures-paper' directory. diff --git a/experiments/plot-scripts/plot_script_main.py b/experiments/plot-scripts/plot_script_main.py index 1ee9f01..c9f6c10 100644 --- a/experiments/plot-scripts/plot_script_main.py +++ b/experiments/plot-scripts/plot_script_main.py @@ -159,12 +159,13 @@ def getFilteredPercentRelativeError(): if len(sys.argv) == 3: result_folder = str(sys.argv[1]) - exp = sys.argv[2] + exp = " ".join(sys.argv[2:]) else: result_folder = "../results-paper" - exp = sys.argv[1] - - if exp =="figure_8" or "all": + exp = " ".join(sys.argv[1:]) + + + if exp == "figure_8" or exp == "all": #Parse results results = readResults(result_folder+"/scalability/taxi-in-memory.txt") #Separate different approaches @@ -200,7 +201,7 @@ def getFilteredPercentRelativeError(): 'figure_8_2' ) - if exp =="figure_9" or "all": + if exp == "figure_9" or exp == "all": # Parse results results = readResults(result_folder+"/scalability/taxi-ooc.txt") # Separate different approaches @@ -240,7 +241,7 @@ def getFilteredPercentRelativeError(): ) - if exp == "figure_10" or "all": + if exp == "figure_10" or exp == "all": #Parse results results = readResults(result_folder+"/scalability/taxi-ooc-polygons.txt") #Separate different approaches @@ -309,7 +310,7 @@ def getFilteredPercentRelativeError(): 'figure_10_1' ) - if exp == "figure_11" or "all": + if exp == "figure_11" or exp == "all": # Parse results results = readResults(result_folder+"/scalability/taxi-mem-attrib.txt") @@ -355,7 +356,7 @@ def getFilteredPercentRelativeError(): ) - if exp == "figure_12" or "all": + if exp == "figure_12" or exp == "all": # Parse results results = readResults(result_folder+"/accuracy/taxi-acc-ooc.txt") @@ -403,7 +404,7 @@ def getFilteredPercentRelativeError(): box_plot(filtered_errors[::-1], ['1', '2', '3', '5', '10', '20'], "../figures-paper/12_2.png", "nothing") - if exp == "figure_13" or "all": + if exp == "figure_13" or exp == "all": #Parse results results = readResults(result_folder+"/scalability/twitter-cpu-ooc.txt") #Separate different approaches @@ -435,7 +436,7 @@ def getFilteredPercentRelativeError(): 'figure_13_2' ) - if exp == "figure_14" or "all": + if exp == "figure_14" or exp == "all": results = readResults(result_folder+"/accuracy/twitter-acc.txt") # Separate different approaches