Undo export of 'svg', 'pdf', 'ps', 'eps'. too common short words.
Implement and export the output shortcuts 'save_svg', 'save_pdf', 'save_ps', 'save_eps'. Think about: Extend the function names with prefix 'plots_' to make it much more unique.
This commit is contained in:
parent
ed45d1e02f
commit
bbd3a4f92f
@ -65,10 +65,11 @@ export
|
|||||||
# output.jl
|
# output.jl
|
||||||
savefig,
|
savefig,
|
||||||
png,
|
png,
|
||||||
svg,
|
save_png,
|
||||||
pdf,
|
save_svg,
|
||||||
ps,
|
save_pdf,
|
||||||
eps,
|
save_ps,
|
||||||
|
save_eps,
|
||||||
gui,
|
gui,
|
||||||
inline,
|
inline,
|
||||||
closeall,
|
closeall,
|
||||||
|
|||||||
@ -9,6 +9,8 @@ function png(plt::Plot, fn::AbstractString)
|
|||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
png(fn::AbstractString) = png(current(), fn)
|
png(fn::AbstractString) = png(current(), fn)
|
||||||
|
save_png(plt::Plot, fn::AbstractString) = png(plt::Plot, fn::AbstractString)
|
||||||
|
save_png(fn::AbstractString) = png(current(), fn)
|
||||||
|
|
||||||
function svg(plt::Plot, fn::AbstractString)
|
function svg(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "svg")
|
fn = addExtension(fn, "svg")
|
||||||
@ -17,6 +19,8 @@ function svg(plt::Plot, fn::AbstractString)
|
|||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
svg(fn::AbstractString) = svg(current(), fn)
|
svg(fn::AbstractString) = svg(current(), fn)
|
||||||
|
save_svg(plt::Plot, fn::AbstractString) = svg(plt::Plot, fn::AbstractString)
|
||||||
|
save_svg(fn::AbstractString) = svg(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
function pdf(plt::Plot, fn::AbstractString)
|
function pdf(plt::Plot, fn::AbstractString)
|
||||||
@ -26,6 +30,8 @@ function pdf(plt::Plot, fn::AbstractString)
|
|||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
pdf(fn::AbstractString) = pdf(current(), fn)
|
pdf(fn::AbstractString) = pdf(current(), fn)
|
||||||
|
save_pdf(plt::Plot, fn::AbstractString) = pdf(plt::Plot, fn::AbstractString)
|
||||||
|
save_pdf(fn::AbstractString) = pdf(current(), fn)
|
||||||
|
|
||||||
|
|
||||||
function ps(plt::Plot, fn::AbstractString)
|
function ps(plt::Plot, fn::AbstractString)
|
||||||
@ -35,6 +41,8 @@ function ps(plt::Plot, fn::AbstractString)
|
|||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
ps(fn::AbstractString) = ps(current(), fn)
|
ps(fn::AbstractString) = ps(current(), fn)
|
||||||
|
save_ps(plt::Plot, fn::AbstractString) = ps(plt::Plot, fn::AbstractString)
|
||||||
|
save_ps(fn::AbstractString) = ps(current(), fn)
|
||||||
|
|
||||||
function eps(plt::Plot, fn::AbstractString)
|
function eps(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "eps")
|
fn = addExtension(fn, "eps")
|
||||||
@ -43,6 +51,8 @@ function eps(plt::Plot, fn::AbstractString)
|
|||||||
close(io)
|
close(io)
|
||||||
end
|
end
|
||||||
eps(fn::AbstractString) = eps(current(), fn)
|
eps(fn::AbstractString) = eps(current(), fn)
|
||||||
|
save_eps(plt::Plot, fn::AbstractString) = eps(plt::Plot, fn::AbstractString)
|
||||||
|
save_eps(fn::AbstractString) = eps(current(), fn)
|
||||||
|
|
||||||
function tex(plt::Plot, fn::AbstractString)
|
function tex(plt::Plot, fn::AbstractString)
|
||||||
fn = addExtension(fn, "tex")
|
fn = addExtension(fn, "tex")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user