From 3ed50bbf0fbc028026cbe3d4a8ff191f4ec07906 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Wed, 18 Mar 2020 00:22:55 +0100 Subject: [PATCH] make type recipes work for vectors --- src/series.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/series.jl b/src/series.jl index bba2f313..4f66da77 100644 --- a/src/series.jl +++ b/src/series.jl @@ -181,11 +181,11 @@ function _apply_type_recipe(plotattributes, v::AbstractArray) isempty(skipmissing(v)) && return Float64[] x = first(skipmissing(v)) args = RecipesBase.apply_recipe(plotattributes, typeof(x), x)[1].args - if length(args) == 2 && typeof(args[1]) <: Function && typeof(args[2]) <: Function + if length(args) == 2 && all(arg -> arg isa Function, args) numfunc, formatter = args Formatted(map(numfunc, v), formatter) else - v + RecipesBase.apply_recipe(plotattributes, typeof(v), v)[1].args[1] end end