Skip to content

Commit 3971083

Browse files
committed
fix: revert formatting
1 parent 9b00079 commit 3971083

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: src/cabinetry/visualize/plot_result.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def pulls(
9696
numeric = np.zeros(num_pars, dtype=bool) if numeric is None else np.asarray(numeric)
9797
y_positions = np.arange(num_pars)[::-1]
9898

99-
fig, ax = plt.subplots()
99+
fig, ax = plt.subplots(figsize=(6, 1 + num_pars / 4))
100100
if num_pars > np.sum(numeric): # Actual pulls
101101
ax.errorbar(
102102
np.ma.masked_array(bestfit, mask=numeric),
@@ -129,6 +129,10 @@ def pulls(
129129
ax.set_ylim([-0.5, num_pars - 0.5])
130130
ax.set_yticks(y_positions)
131131
ax.set_yticklabels(labels)
132+
ax.xaxis.set_minor_locator(mpl.ticker.AutoMinorLocator()) # minor ticks
133+
ax.tick_params(axis="both", which="major", pad=8)
134+
ax.tick_params(direction="in", top=True, right=True, which="both")
135+
fig.set_tight_layout(True)
132136

133137
utils._save_and_close(fig, figure_path, close_figure)
134138
return fig

Diff for: tests/visualize/reference/pulls.png

-3.59 KB
Loading

0 commit comments

Comments
 (0)