From f1cbeb549ce771483400b56a61f31108a07945bb Mon Sep 17 00:00:00 2001 From: yha Date: Thu, 8 Aug 2019 19:05:53 +0300 Subject: [PATCH] Recipe for plotting dicts as bars. --- src/series.jl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/series.jl b/src/series.jl index f3731fc9..bdb0fd3b 100644 --- a/src/series.jl +++ b/src/series.jl @@ -355,7 +355,12 @@ end end end +# Dicts with Real values are plotted as bars +@recipe function f(d::AbstractDict{T,<:Real}) where T + seriestype --> :bar + x, y = collect(keys(d)), collect(values(d)) +end # function without range... use the current range of the x-axis