plot recipe fixes
This commit is contained in:
parent
cf12ff8070
commit
ea8ccf38db
15
src/plot.jl
15
src/plot.jl
@ -378,7 +378,7 @@ function _plot!(plt::Plot, d::KW, args...)
|
|||||||
# "PLOT RECIPES"
|
# "PLOT RECIPES"
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|
||||||
# TODO: a new recipe type: "plot recipe", which acts like a series type, and is processed before
|
# "plot recipe", which acts like a series type, and is processed before
|
||||||
# the plot layout is created, which allows for setting layouts and other plot-wide attributes.
|
# the plot layout is created, which allows for setting layouts and other plot-wide attributes.
|
||||||
# we get inputs which have been fully processed by "user recipes" and "type recipes",
|
# we get inputs which have been fully processed by "user recipes" and "type recipes",
|
||||||
# so we can expect standard vectors, surfaces, etc. No defaults have been set yet.
|
# so we can expect standard vectors, surfaces, etc. No defaults have been set yet.
|
||||||
@ -393,14 +393,19 @@ function _plot!(plt::Plot, d::KW, args...)
|
|||||||
try
|
try
|
||||||
st = next_kw[:seriestype]
|
st = next_kw[:seriestype]
|
||||||
st = next_kw[:seriestype] = get(_typeAliases, st, st)
|
st = next_kw[:seriestype] = get(_typeAliases, st, st)
|
||||||
datalist = RecipesBase.apply_recipe(next_kw, Val{st})
|
datalist = RecipesBase.apply_recipe(next_kw, Val{st}, plt)
|
||||||
info("processed $st $(length(datalist))")
|
|
||||||
for data in datalist
|
for data in datalist
|
||||||
push!(kw_list, data.d)
|
if data.d[:seriestype] == st
|
||||||
|
error("Plot recipe $st returned the same seriestype: $(data.d)")
|
||||||
|
end
|
||||||
|
push!(still_to_process, data.d)
|
||||||
end
|
end
|
||||||
catch err
|
catch err
|
||||||
@show err
|
if isa(err, MethodError)
|
||||||
push!(kw_list, next_kw)
|
push!(kw_list, next_kw)
|
||||||
|
else
|
||||||
|
rethrow()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -111,6 +111,8 @@ num_series(x::AMat) = size(x,2)
|
|||||||
num_series(x) = 1
|
num_series(x) = 1
|
||||||
|
|
||||||
|
|
||||||
|
RecipesBase.apply_recipe{T}(d::KW, ::Type{T}, plt::Plot) = throw(MethodError("Unmatched plot recipe: $T"))
|
||||||
|
|
||||||
# # if it's not a recipe, just do nothing and return the args
|
# # if it's not a recipe, just do nothing and return the args
|
||||||
# function RecipesBase.apply_recipe(d::KW, args...; issubplot=false)
|
# function RecipesBase.apply_recipe(d::KW, args...; issubplot=false)
|
||||||
# if issubplot && !isempty(args) && !haskey(d, :n) && !haskey(d, :layout)
|
# if issubplot && !isempty(args) && !haskey(d, :n) && !haskey(d, :layout)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user