Merge pull request #2396 from GaaH/add-txt-extension

save unicodeplots with .txt extension
This commit is contained in:
Daniel Schwabeneder
2020-02-12 09:12:42 +01:00
committed by GitHub
+8
View File
@@ -60,6 +60,13 @@ function html(plt::Plot, fn::AbstractString)
end
html(fn::AbstractString) = html(current(), fn)
function txt(plt::Plot, fn::AbstractString)
fn = addExtension(fn, "txt")
io = open(fn, "w")
show(io, MIME("text/plain"), plt)
close(io)
end
txt(fn::AbstractString) = txt(current(), fn)
# ----------------------------------------------------------------
@@ -73,6 +80,7 @@ const _savemap = Dict(
"tex" => tex,
"html" => html,
"tikz" => tex,
"txt" => txt,
)
function getExtension(fn::AbstractString)