Merge pull request #2396 from GaaH/add-txt-extension
save unicodeplots with .txt extension
This commit is contained in:
commit
0c0a2c215c
@ -60,6 +60,13 @@ function html(plt::Plot, fn::AbstractString)
|
|||||||
end
|
end
|
||||||
html(fn::AbstractString) = html(current(), fn)
|
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,
|
"tex" => tex,
|
||||||
"html" => html,
|
"html" => html,
|
||||||
"tikz" => tex,
|
"tikz" => tex,
|
||||||
|
"txt" => txt,
|
||||||
)
|
)
|
||||||
|
|
||||||
function getExtension(fn::AbstractString)
|
function getExtension(fn::AbstractString)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user