Skip to content

Commit

Permalink
keep size when plotting in juno (#2826)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith authored Jul 1, 2020
1 parent 698f9d8 commit 22cf3e1
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,25 +249,17 @@ closeall() = closeall(backend())
# Atom PlotPane
# ---------------------------------------------------------
function showjuno(io::IO, m, plt)
sz = collect(plt[:size])
dpi = plt[:dpi]
thickness_scaling = plt[:thickness_scaling]

jsize = get(io, :juno_plotsize, [400, 500])
jratio = get(io, :juno_dpi_ratio, 1)

scale = minimum(jsize[i] / sz[i] for i in 1:2)
plt[:size] = [s * scale for s in sz]
plt[:dpi] = jratio * Plots.DPI
plt[:thickness_scaling] *= scale

prepare_output(plt)
try
_showjuno(io, m, plt)
finally
plt[:size] = sz
plt[:dpi] = dpi
plt[:thickness_scaling] = thickness_scaling
end
end

Expand Down

0 comments on commit 22cf3e1

Please sign in to comment.