setTicksFromStringVector fixes; travis
This commit is contained in:
parent
17a90e3b00
commit
7bee9a5829
@ -227,6 +227,7 @@ function setTicksFromStringVector(plt::Plot, d::KW, di::KW, letter)
|
|||||||
|
|
||||||
# do we really want to do this?
|
# do we really want to do this?
|
||||||
typeof(v) <: AbstractArray || return
|
typeof(v) <: AbstractArray || return
|
||||||
|
isempty(v) && return
|
||||||
trueOrAllTrue(_ -> typeof(_) <: AbstractString, v) || return
|
trueOrAllTrue(_ -> typeof(_) <: AbstractString, v) || return
|
||||||
|
|
||||||
# compute the ticks and labels
|
# compute the ticks and labels
|
||||||
@ -234,7 +235,12 @@ function setTicksFromStringVector(plt::Plot, d::KW, di::KW, letter)
|
|||||||
# extend the existing ticks and labels. only add to labels if they're new!
|
# extend the existing ticks and labels. only add to labels if they're new!
|
||||||
ticks, labels = pargs[ticksym]
|
ticks, labels = pargs[ticksym]
|
||||||
newlabels = filter(_ -> !(_ in labels), unique(v))
|
newlabels = filter(_ -> !(_ in labels), unique(v))
|
||||||
ticks = vcat(ticks, maximum(ticks) + (1:length(newlabels)))
|
newticks = if isempty(ticks)
|
||||||
|
collect(1:length(newlabels))
|
||||||
|
else
|
||||||
|
maximum(ticks) + collect(1:length(newlabels))
|
||||||
|
end
|
||||||
|
ticks = vcat(ticks, newticks)
|
||||||
labels = vcat(labels, newlabels)
|
labels = vcat(labels, newlabels)
|
||||||
ticks, labels
|
ticks, labels
|
||||||
else
|
else
|
||||||
|
|||||||
@ -232,8 +232,11 @@ end
|
|||||||
|
|
||||||
# given a fully processed KW, add the series to the Plot
|
# given a fully processed KW, add the series to the Plot
|
||||||
function _add_series_subplot(plt::Plot, d::KW)
|
function _add_series_subplot(plt::Plot, d::KW)
|
||||||
setTicksFromStringVector(d, d, :x, :xticks)
|
# setTicksFromStringVector(d, d, :x, :xticks)
|
||||||
setTicksFromStringVector(d, d, :y, :yticks)
|
# setTicksFromStringVector(d, d, :y, :yticks)
|
||||||
|
setTicksFromStringVector(plt, d, d, "x")
|
||||||
|
setTicksFromStringVector(plt, d, d, "y")
|
||||||
|
setTicksFromStringVector(plt, d, d, "z")
|
||||||
|
|
||||||
# this is the actual call to the backend
|
# this is the actual call to the backend
|
||||||
_add_series(plt.backend, plt, d)
|
_add_series(plt.backend, plt, d)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Pkg.build("ImageMagick")
|
|||||||
Pkg.clone("GR")
|
Pkg.clone("GR")
|
||||||
Pkg.build("GR")
|
Pkg.build("GR")
|
||||||
|
|
||||||
Pkg.clone("https://github.com/JuliaPlots/RecipesBase.jl.git")
|
# Pkg.clone("https://github.com/JuliaPlots/RecipesBase.jl.git")
|
||||||
Pkg.clone("https://github.com/tbreloff/ExamplePlots.jl.git");
|
Pkg.clone("https://github.com/tbreloff/ExamplePlots.jl.git");
|
||||||
|
|
||||||
# Pkg.clone("https://github.com/JunoLab/Blink.jl.git")
|
# Pkg.clone("https://github.com/JunoLab/Blink.jl.git")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user