alternative approach

This commit is contained in:
Moelf 2020-10-05 00:53:12 -04:00
parent bdcc8cdb8d
commit 083fe89905

View File

@ -1489,10 +1489,6 @@ 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
@ -1539,8 +1535,16 @@ function _update_subplot_args(plt::Plot, sp::Subplot, plotattributes_in, subplot
_update_subplot_periphery(sp, anns) _update_subplot_periphery(sp, anns)
_update_subplot_colors(sp) _update_subplot_colors(sp)
lims_warned = false
for letter in (:x, :y, :z) for letter in (:x, :y, :z)
_update_axis(plt, sp, plotattributes_in, letter, subplot_index) _update_axis(plt, sp, plotattributes_in, letter, subplot_index)
lk = Symbol(letter, :lims)
# warn against using `Range` in x,y,z lims
if !lims_warned && haskey(plotattributes_in, lk) && plotattributes_in[lk] isa AbstractRange
@warn("lims should be a Tuple, not $(typeof(plotattributes_in[lk])).")
lims_warned = true
end
end end
end end