Merge pull request #2543 from daschw/typesurface
allow type recipes for numbers in surfaces
This commit is contained in:
commit
ae396ef576
@ -1,7 +1,7 @@
|
|||||||
name = "Plots"
|
name = "Plots"
|
||||||
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
|
||||||
author = ["Tom Breloff (@tbreloff)"]
|
author = ["Tom Breloff (@tbreloff)"]
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
|
|
||||||
[deps]
|
[deps]
|
||||||
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
|
||||||
|
|||||||
@ -216,7 +216,10 @@ function _apply_type_recipe(plotattributes, v::AbstractArray, letter)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# special handling for Surface... need to properly unwrap and re-wrap
|
# 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, AbstractString, Missing}}},
|
||||||
|
) = v
|
||||||
function _apply_type_recipe(plotattributes, v::Surface)
|
function _apply_type_recipe(plotattributes, v::Surface)
|
||||||
ret = _apply_type_recipe(plotattributes, v.surf)
|
ret = _apply_type_recipe(plotattributes, v.surf)
|
||||||
if typeof(ret) <: Formatted
|
if typeof(ret) <: Formatted
|
||||||
@ -228,8 +231,11 @@ end
|
|||||||
|
|
||||||
# don't do anything vectors of datapoints and for nothing
|
# don't do anything vectors of datapoints and for nothing
|
||||||
_apply_type_recipe(plotattributes, v::Nothing, letter) = v
|
_apply_type_recipe(plotattributes, v::Nothing, letter) = v
|
||||||
_apply_type_recipe(plotattributes, v::AbstractArray{<:MaybeString}, letter) = v
|
_apply_type_recipe(
|
||||||
_apply_type_recipe(plotattributes, v::AbstractArray{<:Union{Real, Nothing}}, letter) = v
|
plotattributes,
|
||||||
|
v::AbstractArray{<:Union{AbstractFloat, Integer, AbstractString, Missing}},
|
||||||
|
letter,
|
||||||
|
) = v
|
||||||
|
|
||||||
# axis args before type recipes should still be mapped to all axes
|
# axis args before type recipes should still be mapped to all axes
|
||||||
function _preprocess_axis_args!(plotattributes)
|
function _preprocess_axis_args!(plotattributes)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user