From ca17be8db3b042f48bf319c778f5027986af70c3 Mon Sep 17 00:00:00 2001 From: Giorgio Calderone Date: Wed, 15 Apr 2020 19:45:13 +0200 Subject: [PATCH] Use binary files to send Vararg{AbstractVector, N} --- src/Gnuplot.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Gnuplot.jl b/src/Gnuplot.jl index 3998c24..37a5ff5 100644 --- a/src/Gnuplot.jl +++ b/src/Gnuplot.jl @@ -632,6 +632,7 @@ function DatasetBin(cols::Vararg{AbstractVector, N}) where N end end close(io) + source *= " using " * join(1:N, ":") * " " return DatasetBin(Val(:inner), path, source) end @@ -685,6 +686,8 @@ function useBinaryMethod(args...) elseif options.preferred_format == :auto if (length(args) == 1) && isa(args[1], AbstractMatrix) binary = true + elseif length(args[1]) > 10^4 + binary = true end end return binary @@ -960,7 +963,7 @@ function parseArguments(_args...) elseif isa(arg, Real) # ==> a dataset column with only one row args[pos] = [arg] elseif hasmethod(recipe, tuple(typeof(arg))) # ==> implicit recipe - @info which(recipe, tuple(typeof(arg))) # debug + # @info which(recipe, tuple(typeof(arg))) # debug deleteat!(args, pos) insert!(args, pos, recipe(arg)) continue @@ -1088,7 +1091,7 @@ function driver(_args...; is3d=false) end end elems = elems[sortperm(getfield.(elems, :mid))] - display(elems) # debug + # display(elems) # debug # Set dataset names and send them to gnuplot process for elem in elems