From 9e35cc3fe1ee7cf32b37cd755035492385ea8d3f 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 d494a342..b20f045e 100644 --- a/src/series.jl +++ b/src/series.jl @@ -352,7 +352,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