Skip to content

Commit 4ce747a

Browse files
committed
Set aspect ratio and tight layout
1 parent 9e1c079 commit 4ce747a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

panel/simdec_app.py

+4
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def figure_pn(
242242
ax=axs[0][0],
243243
)
244244
axs[0][0].set_xlim(xlim)
245+
axs[0][0].set_box_aspect(aspect=1)
245246

246247
data = pd.concat([pd.melt(res.bins), pd.melt(res2.bins)["value"]], axis=1)
247248
data.columns = ["c", "x", "y"]
@@ -251,6 +252,7 @@ def figure_pn(
251252
)
252253
axs[1][0].set(xlabel=output_name)
253254
axs[1][0].set(ylabel=output_2_name)
255+
axs[1][0].set_box_aspect(aspect=1)
254256

255257
_ = sns.histplot(
256258
data,
@@ -266,7 +268,9 @@ def figure_pn(
266268
ax=axs[1][1],
267269
)
268270
axs[1][1].set_ylim(ylim)
271+
axs[1][1].set_box_aspect(aspect=1)
269272

273+
fig.tight_layout()
270274
return fig
271275

272276

0 commit comments

Comments
 (0)