Alternative approach
This commit is contained in:
parent
994b543add
commit
bdcc8cdb8d
@ -1238,7 +1238,6 @@ convertLegendValue(v::AbstractArray) = map(convertLegendValue, v)
|
|||||||
# 1-row matrices will give an element
|
# 1-row matrices will give an element
|
||||||
# multi-row matrices will give a column
|
# multi-row matrices will give a column
|
||||||
# InputWrapper just gives the contents
|
# InputWrapper just gives the contents
|
||||||
# AbstractRange gives (first, last) tuple
|
|
||||||
# anything else is returned as-is
|
# anything else is returned as-is
|
||||||
function slice_arg(v::AMat, idx::Int)
|
function slice_arg(v::AMat, idx::Int)
|
||||||
c = mod1(idx, size(v,2))
|
c = mod1(idx, size(v,2))
|
||||||
@ -1246,7 +1245,6 @@ function slice_arg(v::AMat, idx::Int)
|
|||||||
size(v,1) == 1 ? v[first(m),n[c]] : v[:,n[c]]
|
size(v,1) == 1 ? v[first(m),n[c]] : v[:,n[c]]
|
||||||
end
|
end
|
||||||
slice_arg(wrapper::InputWrapper, idx) = wrapper.obj
|
slice_arg(wrapper::InputWrapper, idx) = wrapper.obj
|
||||||
slice_arg(v::AbstractRange, idx) = (first(v), last(v))
|
|
||||||
slice_arg(v, idx) = v
|
slice_arg(v, idx) = v
|
||||||
|
|
||||||
|
|
||||||
@ -1491,6 +1489,10 @@ function _update_axis(axis::Axis, plotattributes_in::AKW, letter::Symbol, subplo
|
|||||||
# then get those args that were passed with a leading letter: `xlabel = "X"`
|
# then get those args that were passed with a leading letter: `xlabel = "X"`
|
||||||
lk = Symbol(letter, k)
|
lk = Symbol(letter, k)
|
||||||
if haskey(plotattributes_in, lk)
|
if haskey(plotattributes_in, lk)
|
||||||
|
# warn against using range in x,y,z lims
|
||||||
|
if k==:lims && plotattributes_in[lk] isa AbstractRange
|
||||||
|
@warn("$lk should be a Tuple")
|
||||||
|
end
|
||||||
kw[k] = slice_arg(plotattributes_in[lk], subplot_index)
|
kw[k] = slice_arg(plotattributes_in[lk], subplot_index)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user