color fixes; add PlotUtils to travis_commands

This commit is contained in:
Thomas Breloff 2016-07-08 09:17:39 -04:00
parent e53ab85745
commit 396721568f
6 changed files with 8 additions and 13 deletions

View File

@ -1113,11 +1113,11 @@ function _add_defaults!(d::KW, plt::Plot, sp::Subplot, commandIndex::Int)
for s in (:line, :marker, :fill)
csym, asym = Symbol(s,:color), Symbol(s,:alpha)
d[csym] = if d[csym] == :match
if has_black_border_for_default(d[:seriestype]) && s == :line
plot_color(:black, d[asym])
plot_color(if has_black_border_for_default(d[:seriestype]) && s == :line
:black
else
d[:seriescolor]
end
end, d[asym])
else
getSeriesRGBColor(d[csym], d[asym], sp, plotIndex)
end

View File

@ -301,7 +301,7 @@ end
function plotly_colorscale(grad::ColorGradient, alpha = nothing)
[[grad.values[i], rgba_string(grad.colors[i], alpha)] for i in 1:length(grad.colors)]
end
plotly_colorscale(c, alpha = nothing) = plotly_colorscale(default_gradient(), alpha)
plotly_colorscale(c, alpha = nothing) = plotly_colorscale(cgrad(), alpha)
const _plotly_markers = KW(
:rect => "square",

View File

@ -173,8 +173,8 @@ function py_marker(marker::Symbol)
marker == :diamond && return "D"
marker == :utriangle && return "^"
marker == :dtriangle && return "v"
marker == :cross && return "+"
marker == :xcross && return "x"
# marker == :cross && return "+"
# marker == :xcross && return "x"
marker == :star5 && return "*"
marker == :pentagon && return "p"
marker == :hexagon && return "h"

View File

@ -221,12 +221,6 @@ PlotExample("Contours",
p2 = contour(x, y, Z)
plot(p1, p2)
end)]
# [:(begin
# x = 1:0.3:20
# y = x
# f(x,y) = sin(x)+cos(y)
# contour(x, y, f, fill=true)
# end)]
),
PlotExample("Pie",

View File

@ -228,7 +228,7 @@ Base.cycle(v::AVec, indices::AVec{Int}) = map(i -> cycle(v,i), indices)
Base.cycle(v::AMat, indices::AVec{Int}) = map(i -> cycle(v,i), indices)
Base.cycle(v, idx::AVec{Int}) = v
Base.cycle(grad::ColorGradient, idx) = cycle(grad.colors, idx)
Base.cycle(grad::ColorGradient, idx::Int) = cycle(grad.colors, idx)
makevec(v::AVec) = v
makevec{T}(v::T) = T[v]

View File

@ -10,6 +10,7 @@ Pkg.build("GR")
# Pkg.clone("https://github.com/JuliaPlots/RecipesBase.jl.git")
# Pkg.clone("https://github.com/tbreloff/ExamplePlots.jl.git");
Pkg.clone("https://github.com/JuliaPlots/PlotReferenceImages.jl.git")
Pkg.clone("https://github.com/JuliaPlots/PlotUtils.jl.git")
Pkg.clone("https://github.com/JuliaStats/KernelDensity.jl.git")