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
|
||||
savefig,
|
||||
png,
|
||||
svg,
|
||||
pdf,
|
||||
ps,
|
||||
eps,
|
||||
save_png,
|
||||
save_svg,
|
||||
save_pdf,
|
||||
save_ps,
|
||||
save_eps,
|
||||
gui,
|
||||
inline,
|
||||
closeall,
|
||||
|
||||
@ -9,6 +9,8 @@ function png(plt::Plot, fn::AbstractString)
|
||||
close(io)
|
||||
end
|
||||
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)
|
||||
fn = addExtension(fn, "svg")
|
||||
@ -17,6 +19,8 @@ function svg(plt::Plot, fn::AbstractString)
|
||||
close(io)
|
||||
end
|
||||
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)
|
||||
@ -26,6 +30,8 @@ function pdf(plt::Plot, fn::AbstractString)
|
||||
close(io)
|
||||
end
|
||||
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)
|
||||
@ -35,6 +41,8 @@ function ps(plt::Plot, fn::AbstractString)
|
||||
close(io)
|
||||
end
|
||||
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)
|
||||
fn = addExtension(fn, "eps")
|
||||
@ -43,6 +51,8 @@ function eps(plt::Plot, fn::AbstractString)
|
||||
close(io)
|
||||
end
|
||||
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)
|
||||
fn = addExtension(fn, "tex")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user