Merge pull request #120 from Evizero/master

fix unicodeplots compat
This commit is contained in:
Tom Breloff 2016-01-28 20:25:12 -05:00
commit aab0ec22b9

View File

@ -91,13 +91,13 @@ function addUnicodeSeries!(o, d::Dict, addlegend::Bool, xlim, ylim)
else else
error("Linestyle $lt not supported by UnicodePlots") error("Linestyle $lt not supported by UnicodePlots")
end end
# get the series data and label # get the series data and label
x, y = [collect(float(d[s])) for s in (:x, :y)] x, y = [collect(float(d[s])) for s in (:x, :y)]
label = addlegend ? d[:label] : "" label = addlegend ? d[:label] : ""
# if we happen to pass in allowed color symbols, great... otherwise let UnicodePlots decide # if we happen to pass in allowed color symbols, great... otherwise let UnicodePlots decide
color = d[:linecolor] in UnicodePlots.autoColors ? d[:linecolor] : :auto color = d[:linecolor] in UnicodePlots.color_cycle ? d[:linecolor] : :auto
# add the series # add the series
func(o, x, y; color = color, name = label, style = stepstyle) func(o, x, y; color = color, name = label, style = stepstyle)