allow :auto as limit (#2599)
This commit is contained in:
parent
0456ddfe3a
commit
2373dda3c4
@ -462,11 +462,12 @@ function axis_limits(sp, letter, should_widen = default_should_widen(sp[Symbol(l
|
|||||||
lims = axis[:lims]
|
lims = axis[:lims]
|
||||||
has_user_lims = (isa(lims, Tuple) || isa(lims, AVec)) && length(lims) == 2
|
has_user_lims = (isa(lims, Tuple) || isa(lims, AVec)) && length(lims) == 2
|
||||||
if has_user_lims
|
if has_user_lims
|
||||||
if isfinite(lims[1])
|
lmin, lmax = lims
|
||||||
amin = lims[1]
|
if lmin != :auto && isfinite(lmin)
|
||||||
|
amin = lmin
|
||||||
end
|
end
|
||||||
if isfinite(lims[2])
|
if lmax != :auto && isfinite(lmax)
|
||||||
amax = lims[2]
|
amax = lmax
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if amax <= amin && isfinite(amin)
|
if amax <= amin && isfinite(amin)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user