From 7d3671a70c20e92daddd1b11a8b68cdb2f894750 Mon Sep 17 00:00:00 2001 From: Julius Krumbiegel Date: Fri, 22 May 2020 14:20:23 +0200 Subject: [PATCH] add single VecTypes conversion for point based plots --- src/conversions.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/conversions.jl b/src/conversions.jl index d83751ddd..74f4e47e9 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -51,6 +51,13 @@ function convert_arguments(T::PlotFunc, args...; kw...) end end +""" +Wrap a single point or equivalent object in a single-element array. +""" +function convert_arguments(::PointBased, position::VecTypes{N, <: Number}) where N + ([convert(Point{N, Float32}, position)],) +end + function convert_arguments(::PointBased, positions::AbstractVector{<: VecTypes{N, <: Number}}) where N (elconvert(Point{N, Float32}, positions),) end