rename update! to attr!

This commit is contained in:
Thomas Breloff 2016-10-18 20:45:56 -04:00
parent d291582ad9
commit aa6814a6d3
4 changed files with 8 additions and 8 deletions

View File

@ -31,7 +31,7 @@ export
plot, plot,
plot!, plot!,
update!, attr!,
current, current,
default, default,

View File

@ -1094,7 +1094,7 @@ function _update_axis(axis::Axis, d_in::KW, letter::Symbol, subplot_index::Int)
end end
# update the axis # update the axis
update!(axis, args...; kw...) attr!(axis, args...; kw...)
return return
end end

View File

@ -29,7 +29,7 @@ function Axis(sp::Subplot, letter::Symbol, args...; kw...)
d[:discrete_values] = [] d[:discrete_values] = []
# update the defaults # update the defaults
update!(Axis([sp], d), args...; kw...) attr!(Axis([sp], d), args...; kw...)
end end
function get_axis(sp::Subplot, letter::Symbol) function get_axis(sp::Subplot, letter::Symbol)
@ -83,7 +83,7 @@ function process_axis_arg!(d::KW, arg, letter = "")
end end
# update an Axis object with magic args and keywords # update an Axis object with magic args and keywords
function update!(axis::Axis, args...; kw...) function attr!(axis::Axis, args...; kw...)
# first process args # first process args
d = axis.d d = axis.d
for arg in args for arg in args

View File

@ -714,28 +714,28 @@ Base.push!(series::Series, xi, yi, zi) = (push_x!(series,xi); push_y!(series,yi)
# ------------------------------------------------------- # -------------------------------------------------------
function update!(series::Series; kw...) function attr!(series::Series; kw...)
d = KW(kw) d = KW(kw)
preprocessArgs!(d) preprocessArgs!(d)
for (k,v) in d for (k,v) in d
if haskey(_series_defaults, k) if haskey(_series_defaults, k)
series[k] = v series[k] = v
else else
warn("unused key $k in series update") warn("unused key $k in series attr")
end end
end end
_series_updated(series[:subplot].plt, series) _series_updated(series[:subplot].plt, series)
series series
end end
function update!(sp::Subplot; kw...) function attr!(sp::Subplot; kw...)
d = KW(kw) d = KW(kw)
preprocessArgs!(d) preprocessArgs!(d)
for (k,v) in d for (k,v) in d
if haskey(_subplot_defaults, k) if haskey(_subplot_defaults, k)
sp[k] = v sp[k] = v
else else
warn("unused key $k in subplot update") warn("unused key $k in subplot attr")
end end
end end
sp sp