Skip to content

Commit 54ab36a

Browse files
committed
update plot for fig5
1 parent c9c8302 commit 54ab36a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

plot.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,9 @@ def plot_ycsb_zipf_vs_throughput_tail(exper: str, zipf_thetas_low: List[float],
284284
tick_thetas_low = zipf_thetas_low
285285
if not tick_thetas_high:
286286
tick_thetas_high = zipf_thetas_high
287-
fig, ((ax_tp_low, ax_tail_low), (ax_tp_high, ax_tail_high),
288-
(ax_lat_l, ax_lat_r)) = get_subplots(nrows=3, ncols=2)
287+
fig, ((ax_tp_low, ax_tail_low, ax_lat_l),
288+
(ax_tp_high, ax_tail_high, ax_lat_r)) = get_subplots(nrows=2,
289+
ncols=3)
289290

290291
cc_algs = ["NO_WAIT", "WAIT_DIE", "WOUND_WAIT", "SILO", "SILO_PRIO"]
291292

@@ -317,8 +318,8 @@ def plot_ycsb_zipf_vs_throughput_tail(exper: str, zipf_thetas_low: List[float],
317318
for cc_alg in cc_algs}
318319
make_subplot_latency_cdf(ax, lat_dfs, cc_algs)
319320

320-
return fig, ((ax_tp_low, ax_tail_low), (ax_tp_high, ax_tail_high),
321-
(ax_lat_l, ax_lat_r))
321+
return fig, ((ax_tp_low, ax_tail_low, ax_lat_l),
322+
(ax_tp_high, ax_tail_high, ax_lat_r))
322323

323324

324325
def plot_tpcc_thread_vs_throughput_tail(exper: str, num_wh=1, tail_metric='p999'):
@@ -456,8 +457,8 @@ def plot_fig4():
456457

457458

458459
def plot_fig5():
459-
fig, ((ax_tp_low, ax_tail_low), (ax_tp_high, ax_tail_high),
460-
(ax_lat_l, ax_lat_r)) = plot_ycsb_zipf_vs_throughput_tail(
460+
fig, ((ax_tp_low, ax_tail_low, ax_lat_l),
461+
(ax_tp_high, ax_tail_high, ax_lat_r)) = plot_ycsb_zipf_vs_throughput_tail(
461462
"ycsb_zipf", [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9],
462463
[0.99, 1.1, 1.2, 1.3, 1.4, 1.5], (0.9, 1.5),
463464
[0, 0.3, 0.6, 0.9], [0.99, 1.1, 1.2, 1.3, 1.4, 1.5])
@@ -611,7 +612,6 @@ def make_legend_udprio(height=0.15,
611612
lines = [line_high, line_low]
612613

613614
cc_legend_fig = plt.figure()
614-
cc_legend_fig.set_tight_layout({"pad": 0, "w_pad": 0, "h_pad": 0})
615615
cc_legend_fig.set_size_inches(LEGEND_WIDTH, height)
616616
cc_legend_fig.legend(lines + bars,
617617
["High", "Low"] + [label_map[cc] for cc in cc_algs],
@@ -621,6 +621,7 @@ def make_legend_udprio(height=0.15,
621621
frameon=False,
622622
columnspacing=columnspacing,
623623
labelspacing=0.4)
624+
cc_legend_fig.set_tight_layout({"pad": 0, "w_pad": 0, "h_pad": 0})
624625
cc_legend_fig.savefig(
625626
f"legend_udprio.{IMAGE_TYPE}", transparent=IS_TRANSPARENT)
626627

0 commit comments

Comments
 (0)