Update figure output
This commit is contained in:
parent
2ca68eb05b
commit
8e21f972be
@ -3,11 +3,12 @@ import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
import seaborn as sns
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
import matplotlib as mpl
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.ticker as ticker
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import seaborn as sns
|
||||
|
||||
|
||||
def obj_timeline(file_contents: bytes):
|
||||
@ -111,7 +112,16 @@ if __name__ == "__main__":
|
||||
}
|
||||
)
|
||||
|
||||
sns.set(font_scale=1.23, style="whitegrid", font="IBM Plex Sans")
|
||||
fig, ax = plt.subplots()
|
||||
ax.yaxis.set_major_formatter(ticker.EngFormatter())
|
||||
|
||||
plot = sns.lineplot(
|
||||
data=df, x="Time (s)", y="Cumulative Objective", hue="Solver Version"
|
||||
data=df,
|
||||
x="Time (s)",
|
||||
y="Cumulative Objective",
|
||||
hue="Solver Version",
|
||||
style="Solver Version",
|
||||
linewidth=4,
|
||||
)
|
||||
plot.figure.savefig("output.pdf")
|
||||
|
120
pyflow.lock
120
pyflow.lock
@ -1,3 +1,10 @@
|
||||
[[package]]
|
||||
id = 1
|
||||
name = "cffi"
|
||||
version = "1.14.6"
|
||||
source = "pypi+https://pypi.org/pypi/cffi/1.14.6/json"
|
||||
dependencies = ["pycparser 2.20 pypi+https://pypi.org/pypi/pycparser/2.20/json"]
|
||||
|
||||
[[package]]
|
||||
id = 12
|
||||
name = "six"
|
||||
@ -12,27 +19,6 @@ version = "1.7.0"
|
||||
source = "pypi+https://pypi.org/pypi/scipy/1.7.0/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 13
|
||||
name = "pandas"
|
||||
version = "1.3.0"
|
||||
source = "pypi+https://pypi.org/pypi/pandas/1.3.0/json"
|
||||
dependencies = ["python-dateutil 2.8.1 pypi+https://pypi.org/pypi/python-dateutil/2.8.1/json", "pytz 2018.4 pypi+https://pypi.org/pypi/pytz/2018.4/json"]
|
||||
|
||||
[[package]]
|
||||
id = 20
|
||||
name = "numpy"
|
||||
version = "1.21.0"
|
||||
source = "pypi+https://pypi.org/pypi/numpy/1.21.0/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 10
|
||||
name = "kiwisolver"
|
||||
version = "1.3.1"
|
||||
source = "pypi+https://pypi.org/pypi/kiwisolver/1.3.1/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 7
|
||||
name = "pyparsing"
|
||||
@ -40,34 +26,6 @@ version = "3.0.0b2"
|
||||
source = "pypi+https://pypi.org/pypi/pyparsing/3.0.0b2/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 2
|
||||
name = "pycparser"
|
||||
version = "2.20"
|
||||
source = "pypi+https://pypi.org/pypi/pycparser/2.20/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 8
|
||||
name = "Pillow"
|
||||
version = "8.3.1"
|
||||
source = "pypi+https://pypi.org/pypi/Pillow/8.3.1/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 15
|
||||
name = "python-dateutil"
|
||||
version = "2.8.1"
|
||||
source = "pypi+https://pypi.org/pypi/python-dateutil/2.8.1/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 21
|
||||
name = "matplotlib"
|
||||
version = "3.4.2"
|
||||
source = "pypi+https://pypi.org/pypi/matplotlib/3.4.2/json"
|
||||
dependencies = ["Cycler 0.10.0 pypi+https://pypi.org/pypi/Cycler/0.10.0/json", "Pillow 8.3.1 pypi+https://pypi.org/pypi/Pillow/8.3.1/json", "kiwisolver 1.3.1 pypi+https://pypi.org/pypi/kiwisolver/1.3.1/json", "pyparsing 3.0.0b2 pypi+https://pypi.org/pypi/pyparsing/3.0.0b2/json"]
|
||||
|
||||
[[package]]
|
||||
id = 3
|
||||
name = "seaborn"
|
||||
@ -76,17 +34,10 @@ source = "pypi+https://pypi.org/pypi/seaborn/0.11.1/json"
|
||||
dependencies = ["pandas 1.3.0 pypi+https://pypi.org/pypi/pandas/1.3.0/json", "scipy 1.7.0 pypi+https://pypi.org/pypi/scipy/1.7.0/json"]
|
||||
|
||||
[[package]]
|
||||
id = 1
|
||||
name = "cffi"
|
||||
version = "1.14.6"
|
||||
source = "pypi+https://pypi.org/pypi/cffi/1.14.6/json"
|
||||
dependencies = ["pycparser 2.20 pypi+https://pypi.org/pypi/pycparser/2.20/json"]
|
||||
|
||||
[[package]]
|
||||
id = 14
|
||||
name = "pytz"
|
||||
version = "2018.4"
|
||||
source = "pypi+https://pypi.org/pypi/pytz/2018.4/json"
|
||||
id = 8
|
||||
name = "Pillow"
|
||||
version = "8.3.1"
|
||||
source = "pypi+https://pypi.org/pypi/Pillow/8.3.1/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
@ -96,6 +47,20 @@ version = "0.10.0"
|
||||
source = "pypi+https://pypi.org/pypi/Cycler/0.10.0/json"
|
||||
dependencies = ["six 1.16.0 pypi+https://pypi.org/pypi/six/1.16.0/json"]
|
||||
|
||||
[[package]]
|
||||
id = 14
|
||||
name = "pytz"
|
||||
version = "2018.4"
|
||||
source = "pypi+https://pypi.org/pypi/pytz/2018.4/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 20
|
||||
name = "numpy"
|
||||
version = "1.21.0"
|
||||
source = "pypi+https://pypi.org/pypi/numpy/1.21.0/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 15
|
||||
name = "minizinc"
|
||||
@ -103,4 +68,39 @@ version = "0.4.2"
|
||||
source = "pypi+https://pypi.org/pypi/minizinc/0.4.2/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 13
|
||||
name = "pandas"
|
||||
version = "1.3.0"
|
||||
source = "pypi+https://pypi.org/pypi/pandas/1.3.0/json"
|
||||
dependencies = ["python-dateutil 2.8.1 pypi+https://pypi.org/pypi/python-dateutil/2.8.1/json", "pytz 2018.4 pypi+https://pypi.org/pypi/pytz/2018.4/json"]
|
||||
|
||||
[[package]]
|
||||
id = 15
|
||||
name = "python-dateutil"
|
||||
version = "2.8.1"
|
||||
source = "pypi+https://pypi.org/pypi/python-dateutil/2.8.1/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 2
|
||||
name = "pycparser"
|
||||
version = "2.20"
|
||||
source = "pypi+https://pypi.org/pypi/pycparser/2.20/json"
|
||||
dependencies = []
|
||||
|
||||
[[package]]
|
||||
id = 21
|
||||
name = "matplotlib"
|
||||
version = "3.4.2"
|
||||
source = "pypi+https://pypi.org/pypi/matplotlib/3.4.2/json"
|
||||
dependencies = ["Cycler 0.10.0 pypi+https://pypi.org/pypi/Cycler/0.10.0/json", "Pillow 8.3.1 pypi+https://pypi.org/pypi/Pillow/8.3.1/json", "kiwisolver 1.3.1 pypi+https://pypi.org/pypi/kiwisolver/1.3.1/json", "pyparsing 3.0.0b2 pypi+https://pypi.org/pypi/pyparsing/3.0.0b2/json"]
|
||||
|
||||
[[package]]
|
||||
id = 10
|
||||
name = "kiwisolver"
|
||||
version = "1.3.1"
|
||||
source = "pypi+https://pypi.org/pypi/kiwisolver/1.3.1/json"
|
||||
dependencies = []
|
||||
|
||||
[metadata]
|
||||
|
@ -1,16 +1,16 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
|
||||
import numpy as np
|
||||
import seaborn as sns
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
import matplotlib as mpl
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import seaborn as sns
|
||||
|
||||
if __name__ == "__main__":
|
||||
data = pd.read_csv(sys.argv[1])
|
||||
|
||||
sns.set(font_scale=1.24, style="whitegrid", font="IBM Plex Sans")
|
||||
sns.set(font_scale=1.50, style="whitegrid", font="IBM Plex Sans")
|
||||
fig, ax = plt.subplots()
|
||||
|
||||
plot = sns.scatterplot(
|
||||
@ -19,12 +19,15 @@ if __name__ == "__main__":
|
||||
y="Solve Time (s)",
|
||||
hue="Configuration",
|
||||
style="Configuration",
|
||||
legend="gbac" in sys.argv[1],
|
||||
legend=True,
|
||||
s=150,
|
||||
)
|
||||
|
||||
if "radiation" in sys.argv[1]:
|
||||
ax.set_xlim(0, 0.5)
|
||||
ax.set_ylim(0, 0.5)
|
||||
# ax.legend(handles=handles, labels=labels)
|
||||
# plot.legend(bbox_to_anchor=(0.23, 0.95), loc="upper left", borderaxespad=0)
|
||||
elif "gbac" in sys.argv[1]:
|
||||
handles, labels = ax.get_legend_handles_labels()
|
||||
ax.legend(handles=handles, labels=labels)
|
||||
|
Reference in New Issue
Block a user