Recipe for plotting dicts as bars.

This commit is contained in:
yha 2019-08-08 19:05:53 +03:00 committed by Daniel Schwabeneder
parent e27526992d
commit f1cbeb549c

View File

@ -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