added PLOTS_DEFAULTS env var; check isfinite in axis_limits
This commit is contained in:
parent
e8ade18d47
commit
9d25c8fcd4
@ -241,6 +241,10 @@ const CURRENT_BACKEND = CurrentBackend(:none)
|
|||||||
function __init__()
|
function __init__()
|
||||||
setup_ijulia()
|
setup_ijulia()
|
||||||
setup_atom()
|
setup_atom()
|
||||||
|
|
||||||
|
if haskey(ENV, "PLOTS_DEFAULTS")
|
||||||
|
default(; ENV["PLOTS_DEFAULTS"]...)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|||||||
@ -246,7 +246,7 @@ function axis_limits(axis::Axis, should_widen::Bool = default_should_widen(axis)
|
|||||||
amax = lims[2]
|
amax = lims[2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if amax <= amin
|
if amax <= amin && isfinite(amin)
|
||||||
amax = amin + 1.0
|
amax = amin + 1.0
|
||||||
end
|
end
|
||||||
if should_widen
|
if should_widen
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user