From 0fd24e5210c4592ccf557ca1e4f8531619689271 Mon Sep 17 00:00:00 2001 From: yha Date: Mon, 12 Aug 2019 14:12:00 +0300 Subject: [PATCH] Generalize dict recipe for any element type. Do not default to :bar seriestype. --- src/series.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/series.jl b/src/series.jl index b20f045e..20acc391 100644 --- a/src/series.jl +++ b/src/series.jl @@ -352,12 +352,9 @@ end end end -# Dicts with Real values are plotted as bars +# Dicts: each entry is a data point (x,y)=(key,value) -@recipe function f(d::AbstractDict{T,<:Real}) where T - seriestype --> :bar - x, y = collect(keys(d)), collect(values(d)) -end +@recipe f(d::AbstractDict) = collect(keys(d)), collect(values(d)) # function without range... use the current range of the x-axis