fix saving
This commit is contained in:
parent
8db2de64d5
commit
d337c4edae
@ -1942,7 +1942,7 @@ for (mime, fmt) in (
|
|||||||
filepath = tempname() * "." * $fmt
|
filepath = tempname() * "." * $fmt
|
||||||
withenv(
|
withenv(
|
||||||
"GKS_ENCODING" => "utf8",
|
"GKS_ENCODING" => "utf8",
|
||||||
"GKSwstype" => get(ENV, "GKSwstype", "0"),
|
"GKSwstype" => fmt,
|
||||||
"GKS_FILEPATH" => filepath
|
"GKS_FILEPATH" => filepath
|
||||||
) do
|
) do
|
||||||
gr_display(plt, $fmt)
|
gr_display(plt, $fmt)
|
||||||
@ -1958,13 +1958,13 @@ function _display(plt::Plot{GRBackend})
|
|||||||
if plt[:display_type] == :inline
|
if plt[:display_type] == :inline
|
||||||
GR.emergencyclosegks()
|
GR.emergencyclosegks()
|
||||||
filepath = tempname() * ".pdf"
|
filepath = tempname() * ".pdf"
|
||||||
ENV["GKSwstype"] = "pdf"
|
withenv("GKSwstype" => "pdf", "GKS_FILEPATH" => filepath) do
|
||||||
ENV["GKS_FILEPATH"] = filepath
|
gr_display(plt)
|
||||||
gr_display(plt)
|
GR.emergencyclosegks()
|
||||||
GR.emergencyclosegks()
|
content = string("\033]1337;File=inline=1;preserveAspectRatio=0:", base64encode(open(read, filepath)), "\a")
|
||||||
content = string("\033]1337;File=inline=1;preserveAspectRatio=0:", base64encode(open(read, filepath)), "\a")
|
println(content)
|
||||||
println(content)
|
rm(filepath)
|
||||||
rm(filepath)
|
end
|
||||||
else
|
else
|
||||||
ENV["GKS_DOUBLE_BUF"] = true
|
ENV["GKS_DOUBLE_BUF"] = true
|
||||||
gr_display(plt)
|
gr_display(plt)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user