Skip to content

Commit

Permalink
add run times; fix plot titles; add plots
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdsharpe committed Dec 8, 2023
1 parent 03c5369 commit c01b592
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 50 deletions.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
6,0.3523058,92
7,0.4346942,102
8,0.4395842,118
9,0.4911199,111
10,0.5436046,117
11,0.5984583,126
12,0.6006012,133
13,0.5232611,145
14,0.623791,157
16,0.560765,150
17,0.6738249,186
19,0.65661,172
21,0.6943943,179
23,0.6964778,191
25,0.6656431,214
28,0.9367967,247
31,1.0006255,241
34,0.7157712,274
37,0.7628061,289
41,0.9661527,377
45,1.0276037,373
49,1.1751846,419
54,1.3431482,459
60,1.5456,479
66,2.3954076,782
72,2.2429408,647
79,2.5458149,677
87,3.1813772,811
96,3.3526695,723
106,3.931783,804
116,4.9982799,972
128,5.4573302,694
141,6.0542734,896
155,6.5221044,763
170,7.8776998,754
187,5.7361678,487
206,7.2629899,527
226,8.7140251,578
249,3.159189,114
274,5.0342083,175
301,5.3465268,143
331,4.8220117,86
364,17.1644436,202
401,85.2527637,1534
441,99.1972366,1639
485,21.5091084,185
534,166.5315013,1760
6,0.3167835,91
7,0.2399908,97
8,0.2554018,102
9,0.2640822,105
10,0.2680751,111
11,0.2762655,113
12,0.2726048,110
13,0.2967507,121
14,0.3010347,125
16,0.3285157,140
17,0.3392313,137
19,0.3515443,148
21,0.3578068,150
23,0.372004,151
25,0.4183092,169
28,0.4352795,172
31,0.4587865,173
34,0.5404224,206
37,0.5697273,209
41,0.6112026,214
45,0.6753824,225
49,0.7254601,232
54,0.7204854,227
60,0.8199589,248
66,0.921727,265
72,1.0610225,285
79,1.219263,307
87,1.4262305,341
96,1.7031774,362
106,1.9635827,398
116,2.3067812,434
128,3.2438851,442
141,2.9504272,434
155,3.6784011,475
170,4.0619934,456
187,4.9873495,486
206,5.1337968,439
226,7.0025662,508
249,7.842142,472
274,9.3925761,470
301,11.0082311,451
331,14.4576799,485
364,15.0229587,405
401,19.2688445,423
441,24.3840073,428
485,28.9966984,404
534,34.8469523,374
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def model(x, p):
ax.annotate(
label_to_write,
xy=(x[-1], fit(x[-1])),
xytext=(-5, -45),
xytext=(-5, -25),
textcoords="offset points",
fontsize=10,
zorder=5,
Expand Down Expand Up @@ -512,15 +512,16 @@ def model(x, p):

plt.xscale("log")
plt.yscale("log")
plt.xlim(right=1e3)

from aerosandbox.tools.string_formatting import eng_string

ax.xaxis.set_major_formatter(plt.FuncFormatter(lambda x, pos: eng_string(x)))
ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, pos: f"{x:.4g}"))

p.show_plot(
"AeroSandbox vs. Disciplined Methods"
"\nfor the GP-Compatible Beam Problem",
"AeroSandbox vs. Analytical-Gradient Methods"
"\nfor the Beam Design Optimization Problem",
"Problem Size\n(# of Beam Discretization Points)",
"Computational\nCost\n\n(Wall-clock\nruntime,\nin seconds)",
set_ticks=False,
Expand Down

0 comments on commit c01b592

Please sign in to comment.