working on unicodeplots

This commit is contained in:
Thomas Breloff 2015-09-12 00:31:48 -04:00
parent f322b9ac1c
commit 426a9eb6d3
2 changed files with 2 additions and 4 deletions

View File

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

View File

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