Skip to content

Commit

Permalink
Merge pull request #320 from opencompl/christos/fix-legends
Browse files Browse the repository at this point in the history
Fix legend and axis label positioning
  • Loading branch information
compor authored Nov 8, 2024
2 parents 8b6ab14 + 58855a2 commit 7eb7994
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plots-cgo2025-ae/heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def generate_heatmaps(data: pd.DataFrame):
ax.set_xlabel("$N$")
ax.set_ylabel("$K$", rotation=0)
plt.yticks(rotation=0)
ax.yaxis.set_label_coords(-0.05, 0.95, transform=None)
ax.yaxis.set_label_coords(-0.1, 0.95, transform=None)
ax.xaxis.set_label_coords(1, -0.05, transform=None)

# Skip every second x-axis label
Expand Down
4 changes: 2 additions & 2 deletions plots-cgo2025-ae/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def plot_combined(
for entry, (color, marker, linestyle) in legend_entries.items()
]
labels = list(legend_entries.keys())
fig.legend(lines, labels, ncols=legend_cols, bbox_to_anchor=(0.5, 1.03))
fig.legend(lines, labels, ncols=legend_cols, bbox_to_anchor=(0.5, 1.0))

fig.tight_layout()
fig.tight_layout(pad=2.5)

return fig

0 comments on commit 7eb7994

Please sign in to comment.