From f8d36363b4b625594a25a567645250aade817d28 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 6 Apr 2020 17:09:00 +0200 Subject: [PATCH] allow type recipes for numbers in surfaces --- src/series.jl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/series.jl b/src/series.jl index 40ec0213..df45576a 100644 --- a/src/series.jl +++ b/src/series.jl @@ -216,7 +216,10 @@ function _apply_type_recipe(plotattributes, v::AbstractArray, letter) end # special handling for Surface... need to properly unwrap and re-wrap -_apply_type_recipe(plotattributes, v::Surface{<:AMat{<:DataPoint}}) = v +_apply_type_recipe( + plotattributes, + v::Surface{<:AMat{<:Union{AbstractFloat, Integer, Missing}}}, +) = v function _apply_type_recipe(plotattributes, v::Surface) ret = _apply_type_recipe(plotattributes, v.surf) if typeof(ret) <: Formatted @@ -229,7 +232,11 @@ end # don't do anything vectors of datapoints and for nothing _apply_type_recipe(plotattributes, v::Nothing, letter) = v _apply_type_recipe(plotattributes, v::AbstractArray{<:MaybeString}, letter) = v -_apply_type_recipe(plotattributes, v::AbstractArray{<:Union{Real, Nothing}}, letter) = v +_apply_type_recipe( + plotattributes, + v::AbstractArray{<:Union{AbstractFloat, Integer, Missing}}, + letter, +) = v # axis args before type recipes should still be mapped to all axes function _preprocess_axis_args!(plotattributes)