From 6b7be5ae12b396730993a319fbb1e73f4b818964 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 6 Apr 2020 09:22:52 +0200 Subject: [PATCH 1/4] apply type recipe for AbstractVector{<:Number} --- Project.toml | 2 +- src/series.jl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index a23555b5..fe8d147f 100644 --- a/Project.toml +++ b/Project.toml @@ -53,12 +53,12 @@ julia = "1" FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" GeometryTypes = "4d00f742-c7ba-57c2-abde-4428a4b178cb" Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44" +HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1" Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0" LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433" OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925" -HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" diff --git a/src/series.jl b/src/series.jl index 9a27c96b..db40971f 100644 --- a/src/series.jl +++ b/src/series.jl @@ -226,8 +226,7 @@ function _apply_type_recipe(plotattributes, v::Surface) end end -# don't do anything for datapoints or nothing -_apply_type_recipe(plotattributes, v::AbstractArray{<:DataPoint}, letter) = v +# don't do anything for nothing _apply_type_recipe(plotattributes, v::Nothing, letter) = v # axis args before type recipes should still be mapped to all axes From 5ff0a419ddd2e06207674984c891c8c760544ccc Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 6 Apr 2020 09:23:14 +0200 Subject: [PATCH 2/4] bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index fe8d147f..ab1054eb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Plots" uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" author = ["Tom Breloff (@tbreloff)"] -version = "1.0.0" +version = "1.0.1" [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" From b433b76a8445e907472dfd3b01be7a7ce1f33243 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 6 Apr 2020 09:56:47 +0200 Subject: [PATCH 3/4] allow type recipes for numbers but not for reals --- src/series.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/series.jl b/src/series.jl index db40971f..23d13d77 100644 --- a/src/series.jl +++ b/src/series.jl @@ -228,6 +228,8 @@ end # don't do anything 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 # axis args before type recipes should still be mapped to all axes function _preprocess_axis_args!(plotattributes) From a9d22cfb602a77c38b6700a7f6e0056b9b1d7e1e Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Mon, 6 Apr 2020 10:11:00 +0200 Subject: [PATCH 4/4] update comment --- src/series.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/series.jl b/src/series.jl index 23d13d77..40ec0213 100644 --- a/src/series.jl +++ b/src/series.jl @@ -226,7 +226,7 @@ function _apply_type_recipe(plotattributes, v::Surface) end end -# don't do anything 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::AbstractArray{<:MaybeString}, letter) = v _apply_type_recipe(plotattributes, v::AbstractArray{<:Union{Real, Nothing}}, letter) = v