PLOTS_DEFAULTS and removed pyplot finalizer

This commit is contained in:
Thomas Breloff 2016-06-13 09:42:50 -04:00
parent 9d25c8fcd4
commit 1140b51e91
2 changed files with 6 additions and 3 deletions

View File

@ -243,7 +243,9 @@ function __init__()
setup_atom()
if haskey(ENV, "PLOTS_DEFAULTS")
default(; ENV["PLOTS_DEFAULTS"]...)
for (k,v) in eval(parse(ENV["PLOTS_DEFAULTS"]))
default(k, v)
end
end
end

View File

@ -341,8 +341,9 @@ function _create_backend_figure(plt::Plot{PyPlotBackend})
fig = if plt[:overwrite_figure]
PyPlot.gcf()
else
PyPlot.figure()
finalizer(fig, close)
fig = PyPlot.figure()
# finalizer(fig, close)
fig
end
# clear the figure