added PLOTS_DEFAULTS env var; check isfinite in axis_limits

This commit is contained in:
Thomas Breloff 2016-06-13 09:27:49 -04:00
parent e8ade18d47
commit 9d25c8fcd4
2 changed files with 5 additions and 1 deletions

View File

@ -241,6 +241,10 @@ const CURRENT_BACKEND = CurrentBackend(:none)
function __init__()
setup_ijulia()
setup_atom()
if haskey(ENV, "PLOTS_DEFAULTS")
default(; ENV["PLOTS_DEFAULTS"]...)
end
end
# ---------------------------------------------------------

View File

@ -246,7 +246,7 @@ function axis_limits(axis::Axis, should_widen::Bool = default_should_widen(axis)
amax = lims[2]
end
end
if amax <= amin
if amax <= amin && isfinite(amin)
amax = amin + 1.0
end
if should_widen