fix plot_title for pyplot (#3642)

Co-authored-by: t-bltg <t-bltg@users.noreply.github.com>
This commit is contained in:
t-bltg 2021-07-14 22:01:20 +02:00 committed by GitHub
parent 4bc6412b46
commit 411de69765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,7 +295,9 @@ function _add_plot_title!(plt)
for sym filter(x -> startswith(string(x), "plot_title"), keys(_plot_defaults))
subplot[Symbol(string(sym)[length("plot_") + 1:end])] = plt[sym]
end
plt[:force_minpad] = nothing, 0px, nothing, 0px
top = plt.backend isa PyPlotBackend ? nothing : 0mm
bot = 0mm
plt[:force_minpad] = nothing, top, nothing, bot
subplot[:subplot_index] = last(plt.subplots)[:subplot_index] + 1
plt[:plot_titleindex] = subplot[:subplot_index]
subplot[:framestyle] = :none