|
14 | 14 | import numpy as np |
15 | 15 | import data_cache |
16 | 16 |
|
17 | | -# Increase all font sizes by 8 points from their defaults |
18 | | -rcParams.update({key: rcParams[key] + 8 for key in rcParams if "size" in key and isinstance(rcParams[key], (int, float))}) |
| 17 | +# Increase all font sizes by 16 points from their defaults |
| 18 | +rcParams.update({key: rcParams[key] + 16 for key in rcParams if "size" in key and isinstance(rcParams[key], (int, float))}) |
19 | 19 |
|
20 | 20 | # ============================================================================ |
21 | 21 | # CONFIGURATION SECTION |
@@ -391,8 +391,8 @@ def generate_ecdf(block_dir, zns_dir, output_file, metric_type="get_total", samp |
391 | 391 | print(f"Warning: No run found for {device} {eviction_type}") |
392 | 392 |
|
393 | 393 | # Configure subplot |
394 | | - # ax.set_xlabel("64KiB", fontsize=16, weight='bold') |
395 | | - ax.set_ylabel('Cumulative Probability (%)', fontsize=18) |
| 394 | + # ax.set_xlabel("64KiB", fontsize=28, weight='bold') |
| 395 | + ax.set_ylabel('Cumulative Probability (%)', fontsize=25) |
396 | 396 | ax.set_ylim(0, 100) |
397 | 397 |
|
398 | 398 | # Configure x-axis scale |
@@ -422,7 +422,6 @@ def exp_formatter(x, pos): |
422 | 422 |
|
423 | 423 | ax.xaxis.set_major_formatter(FuncFormatter(exp_formatter)) |
424 | 424 | else: |
425 | | - ax.set_xlim(left=0) |
426 | 425 | # Use MaxNLocator to ensure nice, evenly-spaced tick intervals |
427 | 426 | ax.xaxis.set_major_locator(MaxNLocator(nbins=6, integer=False, prune=None)) |
428 | 427 |
|
@@ -454,14 +453,26 @@ def exp_formatter(x, pos): |
454 | 453 | Line2D([0], [0], color='#f781bf', linestyle='--', linewidth=LINE_WIDTH, |
455 | 454 | label='Block (Chunk LRU)', alpha=0.8), |
456 | 455 | ] |
457 | | - fig.legend(ncols=4, handles=legend_lines, bbox_to_anchor=(subplot_center, 0.02), |
| 456 | + fig.legend(ncols=4, handles=legend_lines, bbox_to_anchor=(subplot_center, -0.09), |
458 | 457 | loc='center', fontsize="large", columnspacing=2.0, frameon=False) |
459 | 458 |
|
460 | 459 | # Add a background box for the x-axis label to make it stand out |
461 | | - label_y = 0.08 |
| 460 | + label_y = 0.01 |
| 461 | + label_width = 0.18 |
| 462 | + label_height = 0.08 |
| 463 | + fig.add_artist( |
| 464 | + Rectangle( |
| 465 | + (subplot_center - label_width/2, label_y - label_height/2), |
| 466 | + label_width, |
| 467 | + label_height, |
| 468 | + facecolor='white', |
| 469 | + edgecolor='none', |
| 470 | + zorder=10, |
| 471 | + ) |
| 472 | + ) |
462 | 473 | # Add x-axis label at the bottom, centered over the subplot |
463 | 474 | fig.text(subplot_center, label_y, 'Latency (ms)', ha='center', va='center', |
464 | | - fontsize=18, weight='bold', zorder=11) |
| 475 | + fontsize=30, weight='bold', zorder=11) |
465 | 476 |
|
466 | 477 | # Save figure |
467 | 478 | plt.savefig(output_file, bbox_inches='tight', dpi=100) |
|
0 commit comments