From 22aaefd1a050289b6210a181d69b2ca349b473ee Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Tue, 20 Sep 2016 16:40:49 -0400 Subject: [PATCH] _apply_type_recipe fix --- src/series.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/series.jl b/src/series.jl index a9324053..86be6954 100644 --- a/src/series.jl +++ b/src/series.jl @@ -171,8 +171,13 @@ _apply_type_recipe(d, v) = RecipesBase.apply_recipe(d, typeof(v), v)[1].args[1] # This sort of recipe should return a pair of functions... one to convert to number, # and one to format tick values. function _apply_type_recipe(d, v::AbstractArray) - numfunc, formatter = RecipesBase.apply_recipe(d, typeof(v[1]), v[1])[1].args - Formatted(map(numfunc, v), formatter) + args = RecipesBase.apply_recipe(d, typeof(v[1]), v[1])[1].args + if length(args) == 2 && typeof(args[1]) <: Function && typeof(args[2]) <: Function + numfunc, formatter = args + Formatted(map(numfunc, v), formatter) + else + v + end end # # special handling for Surface... need to properly unwrap and re-wrap