Skip to content

Commit

Permalink
Number of vehicles barplot
Browse files Browse the repository at this point in the history
  • Loading branch information
dfamonteiro committed Jun 20, 2022
1 parent 0cb05b1 commit 5f86ed8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/pretty_graphs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pandas as pd, seaborn as sns, matplotlib.pyplot as plt

sns.set(font_scale=1.5)
sns.set(font_scale=1.5) # Adgust this if necessary

CVRP_FILES = [
("data/cvrp-benchmarks/greedy_analysis.csv", "Greedy"),
Expand Down Expand Up @@ -32,8 +32,11 @@ def get_data() -> pd.DataFrame:
print(data)
print(data[data["method"] == "Constraint Programming"])

sns.lineplot(data=data, x="num_deliveries", y="time_us", hue="method", lw=2).set(title="Method time performance (μs) (lower is better)")
sns.lineplot(data=data, x="num_deliveries", y="time_us", hue="method", lw=4).set(title="Time performance (μs) (lower is better)")
plt.show()

sns.barplot(data=data, x="num_deliveries", y="solution_length", hue="method").set(title="Method solution quality (lower is better)")
sns.barplot(data=data, x="num_deliveries", y="solution_length", hue="method").set(title="Solution quality (lower is better)")
plt.show()

sns.barplot(data=data, x="num_deliveries", y="num_vehicles", hue="method").set(title="Number of trucks (lower is better)")
plt.show()

0 comments on commit 5f86ed8

Please sign in to comment.