From 426a9eb6d3ad7496a4399740dd3a07792c39db4d Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Sat, 12 Sep 2015 00:31:48 -0400 Subject: [PATCH] working on unicodeplots --- src/args.jl | 2 +- src/backends/unicodeplots.jl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/args.jl b/src/args.jl index 76e3ae3e..225b9f16 100644 --- a/src/args.jl +++ b/src/args.jl @@ -126,7 +126,7 @@ function getPlotKeywordArgs(kw, idx::Int, n::Int) # set label label = d[:label] label = (label == "AUTO" ? "y_$n" : label) - if d[:axis] == :right && label[end-3:end] != " (R)" + if d[:axis] == :right && length(label) >= 4 && label[end-3:end] != " (R)" label = string(label, " (R)") end d[:label] = label diff --git a/src/backends/unicodeplots.jl b/src/backends/unicodeplots.jl index c2ac6868..458fb8a9 100644 --- a/src/backends/unicodeplots.jl +++ b/src/backends/unicodeplots.jl @@ -21,10 +21,8 @@ function rebuildUnicodePlot!(plt::Plot) xlim = [Inf, -Inf] ylim = [Inf, -Inf] for d in sargs - @show xlim ylim d[:x] d[:y] expandLimits!(xlim, d[:x]) expandLimits!(ylim, d[:y]) - @show xlim ylim d[:x] d[:y] end x = Float64[xlim[1]] y = Float64[ylim[1]] @@ -57,7 +55,7 @@ end function addUnicodeSeries!(o, d::Dict, addlegend::Bool) lt = d[:linetype] - x, y = d[:x], d[:y] + x, y = [collect(float(d[s])) for s in (:x, :y)] label = addlegend ? d[:label] : "" stepstyle = :post