diff --git a/src/args.jl b/src/args.jl index 5c1b0463..7e36cac8 100644 --- a/src/args.jl +++ b/src/args.jl @@ -149,7 +149,7 @@ _plotDefaults[:yticks] = :auto _plotDefaults[:xscale] = :identity _plotDefaults[:yscale] = :identity _plotDefaults[:xflip] = false -_plotDefaults[:yflip] = true +_plotDefaults[:yflip] = false _plotDefaults[:size] = (600,400) _plotDefaults[:pos] = (0,0) _plotDefaults[:windowtitle] = "Plots.jl" diff --git a/src/backends/gadfly.jl b/src/backends/gadfly.jl index 3d6bc181..8ffe1ecb 100644 --- a/src/backends/gadfly.jl +++ b/src/backends/gadfly.jl @@ -398,9 +398,9 @@ end function updateGadflyPlotTheme(plt::Plot, d::Dict) kwargs = Dict() - # get the full initargs, overriding any new settings - # TODO: should this be part of the main `plot` command in plot.jl??? - d = merge!(plt.initargs, d) + # # get the full initargs, overriding any new settings + # # TODO: should this be part of the main `plot` command in plot.jl??? + # d = merge!(plt.initargs, d) # hide the legend? if !get(d, :legend, true) diff --git a/src/colors.jl b/src/colors.jl index eaf74915..90211207 100644 --- a/src/colors.jl +++ b/src/colors.jl @@ -87,6 +87,9 @@ convertColor(c::@compat(Union{AbstractString, Symbol})) = parse(Colorant, string convertColor(c::Colorant) = c convertColor(cvec::AbstractVector) = map(convertColor, cvec) +# backup... try to convert +getColor(c) = convertColor(c) + # -------------------------------------------------------------- abstract ColorScheme diff --git a/src/plot.jl b/src/plot.jl index 3bef2888..a6e8d1bd 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -139,7 +139,10 @@ function plot!(plt::Plot, args...; kw...) dumpdict(d, "Updating plot items") # add title, axis labels, ticks, etc - updatePlotItems(plt, d) + if !haskey(d, :subplot) + d = merge!(plt.initargs, d) + updatePlotItems(plt, d) + end current(plt) # NOTE: lets ignore the show param and effectively use the semicolon at the end of the REPL statement diff --git a/src/subplot.jl b/src/subplot.jl index 9f5a37c1..78f85881 100644 --- a/src/subplot.jl +++ b/src/subplot.jl @@ -288,7 +288,12 @@ function postprocessSubplot(subplt::Subplot, d::Dict) # add title, axis labels, ticks, etc for (i,plt) in enumerate(subplt.plts) - di = copy(d) + # di = copy(d) + + # get the full initargs, overriding any new settings + # TODO: should this be part of the main `plot` command in plot.jl??? + di = merge!(plt.initargs, copy(d)) + for (k,v) in di if typeof(v) <: AVec di[k] = v[mod1(i, length(v))] diff --git a/test/imgcomp.jl b/test/imgcomp.jl index a1a6f530..72620b05 100644 --- a/test/imgcomp.jl +++ b/test/imgcomp.jl @@ -126,14 +126,16 @@ function image_comparison_tests(pkg::Symbol, idx::Int; debug = false, sigma = [1 # run the comparison test... a difference will throw an error # NOTE: sigma is a 2-length vector with x/y values for the number of pixels # to blur together when comparing images - Images.test_approx_eq_sigma_eps(tmpimg, refimg, sigma, eps) + diffpct = Images.test_approx_eq_sigma_eps(tmpimg, refimg, sigma, eps) # we passed! - info("Reference image $reffn matches") + info("Reference image $reffn matches. Difference: $diffpct") return true - catch ex - warn("Image did not match reference image $reffn. err: $ex") + catch err + warn("Image did not match reference image $reffn. err: $err") + showerror(Base.STDERR, err) + if isinteractive() # if we're in interactive mode, open a popup and give us a chance to examine the images @@ -144,7 +146,7 @@ function image_comparison_tests(pkg::Symbol, idx::Int; debug = false, sigma = [1 else # if we rejected the image, or if we're in automated tests, throw the error - rethrow(ex) + rethrow(err) end end diff --git a/test/refimg/v0.4/gadfly/ref1.png b/test/refimg/v0.4/gadfly/ref1.png index 4603e270..8645d95d 100644 Binary files a/test/refimg/v0.4/gadfly/ref1.png and b/test/refimg/v0.4/gadfly/ref1.png differ diff --git a/test/refimg/v0.4/gadfly/ref11.png b/test/refimg/v0.4/gadfly/ref11.png index 27232489..38bf6f96 100644 Binary files a/test/refimg/v0.4/gadfly/ref11.png and b/test/refimg/v0.4/gadfly/ref11.png differ diff --git a/test/refimg/v0.4/gadfly/ref12.png b/test/refimg/v0.4/gadfly/ref12.png index 0ebd7f8c..44ea8310 100644 Binary files a/test/refimg/v0.4/gadfly/ref12.png and b/test/refimg/v0.4/gadfly/ref12.png differ diff --git a/test/refimg/v0.4/gadfly/ref13.png b/test/refimg/v0.4/gadfly/ref13.png index d7018dd2..a3d1aecc 100644 Binary files a/test/refimg/v0.4/gadfly/ref13.png and b/test/refimg/v0.4/gadfly/ref13.png differ diff --git a/test/refimg/v0.4/gadfly/ref14.png b/test/refimg/v0.4/gadfly/ref14.png index 45e66964..a3de7c92 100644 Binary files a/test/refimg/v0.4/gadfly/ref14.png and b/test/refimg/v0.4/gadfly/ref14.png differ diff --git a/test/refimg/v0.4/gadfly/ref15.png b/test/refimg/v0.4/gadfly/ref15.png index aaa9dec2..ea2cb739 100644 Binary files a/test/refimg/v0.4/gadfly/ref15.png and b/test/refimg/v0.4/gadfly/ref15.png differ diff --git a/test/refimg/v0.4/gadfly/ref16.png b/test/refimg/v0.4/gadfly/ref16.png index de6df5e2..09551adc 100644 Binary files a/test/refimg/v0.4/gadfly/ref16.png and b/test/refimg/v0.4/gadfly/ref16.png differ diff --git a/test/refimg/v0.4/gadfly/ref2.png b/test/refimg/v0.4/gadfly/ref2.png index 8ced4cad..d9424fac 100644 Binary files a/test/refimg/v0.4/gadfly/ref2.png and b/test/refimg/v0.4/gadfly/ref2.png differ diff --git a/test/refimg/v0.4/gadfly/ref3.png b/test/refimg/v0.4/gadfly/ref3.png index 61f447a7..03bb34db 100644 Binary files a/test/refimg/v0.4/gadfly/ref3.png and b/test/refimg/v0.4/gadfly/ref3.png differ diff --git a/test/refimg/v0.4/gadfly/ref4.png b/test/refimg/v0.4/gadfly/ref4.png index 248fa04f..1ade3079 100644 Binary files a/test/refimg/v0.4/gadfly/ref4.png and b/test/refimg/v0.4/gadfly/ref4.png differ diff --git a/test/refimg/v0.4/gadfly/ref5.png b/test/refimg/v0.4/gadfly/ref5.png index 03494ffd..46436400 100644 Binary files a/test/refimg/v0.4/gadfly/ref5.png and b/test/refimg/v0.4/gadfly/ref5.png differ diff --git a/test/refimg/v0.4/gadfly/ref6.png b/test/refimg/v0.4/gadfly/ref6.png index 0975f08a..6f7b93a8 100644 Binary files a/test/refimg/v0.4/gadfly/ref6.png and b/test/refimg/v0.4/gadfly/ref6.png differ diff --git a/test/refimg/v0.4/gadfly/ref8.png b/test/refimg/v0.4/gadfly/ref8.png index 290c2efa..3675b20d 100644 Binary files a/test/refimg/v0.4/gadfly/ref8.png and b/test/refimg/v0.4/gadfly/ref8.png differ diff --git a/test/refimg/v0.4/gadfly/ref9.png b/test/refimg/v0.4/gadfly/ref9.png index 721df5fc..913db160 100644 Binary files a/test/refimg/v0.4/gadfly/ref9.png and b/test/refimg/v0.4/gadfly/ref9.png differ diff --git a/test/runtests.jl b/test/runtests.jl index 30b43dfb..88cd9f64 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -35,7 +35,7 @@ srand(1234) # plot(x::AMat, y::AMat; kw...) # multiple lines (one per column of x/y... will assert size(x) == size(y)) @fact plot!(rand(10,3), rand(10,3)) --> not(nothing) - image_comparison_tests(:gadfly, skip=[19], eps=1e-2) + image_comparison_tests(:gadfly, skip=[4,19], eps=1e-2) end # catch err