fix push warning

This commit is contained in:
Thomas Breloff 2015-09-25 09:42:16 -04:00
parent 9ce8d138d5
commit a0a0773bd2
2 changed files with 577 additions and 74 deletions

File diff suppressed because one or more lines are too long

View File

@ -145,12 +145,12 @@ limsType(lims) = :invalid
# index versions
function Base.push!(plt::Plot, i::Integer, x, y)
function Base.push!(plt::Plot, i::Integer, x::Real, y::Real)
xdata, ydata = plt[i]
plt[i] = (extendSeriesData(xdata, x), extendSeriesData(ydata, y))
plt
end
function Base.push!(plt::Plot, i::Integer, y)
function Base.push!(plt::Plot, i::Integer, y::Real)
xdata, ydata = plt[i]
if !isa(xdata, UnitRange)
error("Expected x is a UnitRange since you're trying to push a y value only")
@ -170,7 +170,7 @@ function Base.push!(plt::Plot, x::AVec, y::AVec)
plt
end
function Base.push!(plt::Plot, x, y::AVec)
function Base.push!(plt::Plot, x::Real, y::AVec)
push!(plt, [x], y)
end