Update gr.jl

This commit is contained in:
Josef Heinen 2020-04-15 15:16:00 +02:00 committed by GitHub
parent ef36c6bd0a
commit d00920ca0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -822,6 +822,7 @@ end
function _update_min_padding!(sp::Subplot{GRBackend}) function _update_min_padding!(sp::Subplot{GRBackend})
dpi = sp.plt[:thickness_scaling] dpi = sp.plt[:thickness_scaling]
ENV["GKS_ENCODING"] = "utf8"
if !haskey(ENV, "GKSwstype") if !haskey(ENV, "GKSwstype")
if isijulia() if isijulia()
ENV["GKSwstype"] = "svg" ENV["GKSwstype"] = "svg"
@ -1945,6 +1946,7 @@ gr_set_output(wstype::String) = (_gr_wstype[] = wstype)
for (mime, fmt) in _gr_mimeformats for (mime, fmt) in _gr_mimeformats
@eval function _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{GRBackend}) @eval function _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{GRBackend})
ENV["GKS_ENCODING"] = "utf8"
GR.emergencyclosegks() GR.emergencyclosegks()
filepath = tempname() * "." * $fmt filepath = tempname() * "." * $fmt
env = get(ENV, "GKSwstype", "0") env = get(ENV, "GKSwstype", "0")
@ -1963,6 +1965,7 @@ for (mime, fmt) in _gr_mimeformats
end end
function _display(plt::Plot{GRBackend}) function _display(plt::Plot{GRBackend})
ENV["GKS_ENCODING"] = "utf8"
if plt[:display_type] == :inline if plt[:display_type] == :inline
GR.emergencyclosegks() GR.emergencyclosegks()
filepath = tempname() * ".pdf" filepath = tempname() * ".pdf"