Skip to content

Commit

Permalink
Better plotting for the example examples/DeepONet/ROBER/eval_rober.py
Browse files Browse the repository at this point in the history
Signed-off-by: João Lucas de Sousa Almeida <[email protected]>
  • Loading branch information
Joao-L-S-Almeida committed Mar 23, 2023
1 parent 5f8ead2 commit 106a763
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/DeepONet/ROBER/eval_rober.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@
plt.plot(time, evaluation, label="Approximated")
plt.xlabel("t (s)")
plt.savefig("rober_approximation.png")
plt.close()

for i in range(n_outputs):
plt.plot(time, evaluation[:, i])
plt.plot(time, evaluation[:, i], label=f"s_{i+1}")
plt.xlabel("t (s)")
plt.savefig(f"rober_approximation_{i}.png")
plt.close()

plt.yticks(np.linspace(0,1,5))
plt.legend()
plt.grid(True)
plt.savefig(f"rober_approximation_custom.png")

0 comments on commit 106a763

Please sign in to comment.