working on unicodeplots
This commit is contained in:
parent
f322b9ac1c
commit
426a9eb6d3
@ -126,7 +126,7 @@ function getPlotKeywordArgs(kw, idx::Int, n::Int)
|
|||||||
# set label
|
# set label
|
||||||
label = d[:label]
|
label = d[:label]
|
||||||
label = (label == "AUTO" ? "y_$n" : 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)")
|
label = string(label, " (R)")
|
||||||
end
|
end
|
||||||
d[:label] = label
|
d[:label] = label
|
||||||
|
|||||||
@ -21,10 +21,8 @@ function rebuildUnicodePlot!(plt::Plot)
|
|||||||
xlim = [Inf, -Inf]
|
xlim = [Inf, -Inf]
|
||||||
ylim = [Inf, -Inf]
|
ylim = [Inf, -Inf]
|
||||||
for d in sargs
|
for d in sargs
|
||||||
@show xlim ylim d[:x] d[:y]
|
|
||||||
expandLimits!(xlim, d[:x])
|
expandLimits!(xlim, d[:x])
|
||||||
expandLimits!(ylim, d[:y])
|
expandLimits!(ylim, d[:y])
|
||||||
@show xlim ylim d[:x] d[:y]
|
|
||||||
end
|
end
|
||||||
x = Float64[xlim[1]]
|
x = Float64[xlim[1]]
|
||||||
y = Float64[ylim[1]]
|
y = Float64[ylim[1]]
|
||||||
@ -57,7 +55,7 @@ end
|
|||||||
function addUnicodeSeries!(o, d::Dict, addlegend::Bool)
|
function addUnicodeSeries!(o, d::Dict, addlegend::Bool)
|
||||||
|
|
||||||
lt = d[:linetype]
|
lt = d[:linetype]
|
||||||
x, y = d[:x], d[:y]
|
x, y = [collect(float(d[s])) for s in (:x, :y)]
|
||||||
label = addlegend ? d[:label] : ""
|
label = addlegend ? d[:label] : ""
|
||||||
stepstyle = :post
|
stepstyle = :post
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user