Created
November 2, 2017 22:46
-
-
Save csbence/84e4245f0e3166e8413c12631a25f931 to your computer and use it in GitHub Desktop.
Simple Python script to plot the AUV results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import pandas as pd | |
import seaborn as sns | |
__author__ = 'Bence Cserna' | |
# Set the background and the line colors | |
custom_colors = ["#9b59b6", "#3498db", "#34495e", "#e74c3c", "#95a5a6", "#2ecc71"] | |
sns.set_style("whitegrid") | |
sns.set_palette(sns.color_palette(custom_colors)) | |
# Read and pre-process data | |
df = pd.read_csv('auv_results/results.csv') | |
# Rows are automatically indexed, so we don't need the problem column | |
df.drop(['Problem'], 1, inplace=True) | |
# Configure the plot | |
ax = df.plot(style=['s-', 'o-', '^-', '.-'], fontsize=11) | |
ax.set_xlabel("Instance", fontsize=15) | |
ax.set_ylabel("Plan Duration [s]", fontsize=15) | |
ax.set_xticks([]) | |
ax.xaxis.grid(False) | |
ax.legend(prop={'size': 14}) | |
# Save and show the final plot | |
ax.get_figure().savefig('auv_plot.pdf') | |
# sns.plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment