Skip to content

Commit 43e3257

Browse files
committed
Improve visualization
1 parent 99adaa4 commit 43e3257

File tree

2 files changed

+1316
-1114
lines changed

2 files changed

+1316
-1114
lines changed

examples/Constraints_Continuous/interpoint.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
TOLERANCE = 0.01
4949

5050

51-
set_random_seed(42)
51+
set_random_seed(1337)
5252

5353
# ## Defining the Chemical Optimization Problem
5454

@@ -221,9 +221,11 @@
221221
label="Total",
222222
)
223223
plt.axhline(y=60, color="red", linestyle="--", label="Budget")
224-
plt.title("Solvent: Individual + Total")
224+
plt.title("Solvent (Constrained)")
225+
plt.xlabel("Batch")
226+
plt.ylabel("Solvent Volume (mL)")
225227
# fmt: off
226-
plt.legend();
228+
plt.legend(loc='center left', bbox_to_anchor=(1, 0.5))
227229
# fmt: on
228230

229231
plt.sca(axs[1])
@@ -248,10 +250,13 @@
248250
label="Total",
249251
)
250252
plt.axhline(y=30, color="red", linestyle="--", label="Required")
251-
plt.title("Catalyst: Individual + Total")
253+
plt.title("Catalyst (Constrained)")
254+
plt.xlabel("Batch")
255+
plt.ylabel("Catalyst Loading (mol%)")
252256
# fmt: off
253-
plt.legend();
257+
plt.legend(loc='center left', bbox_to_anchor=(1, 0.5))
254258
# fmt: on
255259

256260
plt.tight_layout()
257-
plt.show()
261+
if not SMOKE_TEST:
262+
plt.savefig("interpoint.svg")

0 commit comments

Comments
 (0)