From 707fd6b6f33ebc2dfcb5959fa45a934c056dca44 Mon Sep 17 00:00:00 2001 From: Marius Millea Date: Thu, 24 Feb 2022 00:20:18 -0800 Subject: [PATCH] crop whitespace around displayed figures --- src/compat/multimedia.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compat/multimedia.jl b/src/compat/multimedia.jl index 3973169a..024ce9e7 100644 --- a/src/compat/multimedia.jl +++ b/src/compat/multimedia.jl @@ -106,7 +106,7 @@ function pyshow_rule_savefig(io::IO, mime::String, x::Py) fig = fig.figure end buf = pyimport("io").BytesIO() - x.savefig(buf, format=format) + x.savefig(buf, format=format, bbox_inches="tight") data = @pyconvert(Vector{UInt8}, buf.getvalue(), return false) write(io, data) plt.close(fig)