From ea27bfd0a119efee69b8d9b0f471faca235a0027 Mon Sep 17 00:00:00 2001 From: Andreas Noack Date: Mon, 22 Jan 2018 12:54:10 +0100 Subject: [PATCH] Fix some reprecations --- src/statistics.jl | 4 ++-- test/REQUIRE | 1 + test/testscripts/issue120.jl | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/statistics.jl b/src/statistics.jl index 1997b00a2..0ea454ee7 100644 --- a/src/statistics.jl +++ b/src/statistics.jl @@ -1022,7 +1022,7 @@ function apply_statistic(stat::BoxplotStatistic, if stat.method == :tukey aes.lower_hinge[i], aes.middle[i], aes.upper_hinge[i] = - quantile(ys, [0.25, 0.5, 0.75]) + quantile.(ys, [0.25, 0.5, 0.75]) iqr = aes.upper_hinge[i] - aes.lower_hinge[i] idx = searchsortedfirst(ys, aes.lower_hinge[i] - 1.5iqr) @@ -1628,7 +1628,7 @@ function apply_statistic(stat::BinMeanStatistic, Gadfly.assert_aesthetics_defined("Stat.binmean", aes, :x, :y) - breaks = quantile(aes.x, collect(1:stat.n)/stat.n) + breaks = quantile.(aes.x, collect(1:stat.n)/stat.n) Tx = eltype(aes.x) Ty = eltype(aes.y) diff --git a/test/REQUIRE b/test/REQUIRE index c793fa8d3..50e5c8e13 100644 --- a/test/REQUIRE +++ b/test/REQUIRE @@ -1,3 +1,4 @@ RDatasets Cairo Fontconfig +CSV diff --git a/test/testscripts/issue120.jl b/test/testscripts/issue120.jl index 789ffc16b..802f25326 100644 --- a/test/testscripts/issue120.jl +++ b/test/testscripts/issue120.jl @@ -1,5 +1,5 @@ -using Gadfly, DataFrames, Compat +using Gadfly, DataFrames, Compat, CSV set_default_plot_size(6inch, 3inch) -plot(readtable(joinpath(dirname(@__DIR__), "data","issue120.csv")), x=:x1, y=:x2) +plot(CSV.read(joinpath(dirname(@__DIR__), "data","issue120.csv")), x=:x1, y=:x2)