From a12f601b9c4d4bbd9721928053815cada50c9d06 Mon Sep 17 00:00:00 2001 From: "Michael K. Borregaard" Date: Tue, 6 Jun 2017 13:55:35 +0200 Subject: [PATCH] add legendtitle to example --- src/examples.jl | 2 +- test/runtests.jl | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/examples.jl b/src/examples.jl index 53c27ed3..7025999f 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -119,7 +119,7 @@ PlotExample("Line styles", styles = reshape(styles, 1, length(styles)) # Julia 0.6 unfortunately gives an error when transposing symbol vectors n = length(styles) y = cumsum(randn(20,n),1) - plot(y, line = (5, styles), label = map(string,styles), legendtitle = "Linestyle:") + plot(y, line = (5, styles), label = map(string,styles), legendtitle = "linestyle") end)] ), diff --git a/test/runtests.jl b/test/runtests.jl index 1232915c..4e3ceb1f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,19 +7,6 @@ srand(1234) default(show=false, reuse=true) img_eps = isinteractive() ? 1e-2 : 10e-2 -# facts("Gadfly") do -# @fact gadfly() --> Plots.GadflyBackend() -# @fact backend() --> Plots.GadflyBackend() -# -# @fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyBackend} -# @fact plot(Int[1,2,3], rand(3)) --> not(nothing) -# @fact plot(sort(rand(10)), rand(Int, 10, 3)) --> not(nothing) -# @fact plot!(rand(10,3), rand(10,3)) --> not(nothing) -# -# image_comparison_facts(:gadfly, skip=[4,6,23,24,27], eps=img_eps) -# end - - facts("GR") do @fact gr() --> Plots.GRBackend() @fact backend() --> Plots.GRBackend() @@ -35,6 +22,13 @@ facts("PyPlot") do image_comparison_facts(:pyplot, eps=img_eps) end +facts("UnicodePlots") do + @fact unicodeplots() --> Plots.UnicodePlotsBackend() + @fact backend() --> Plots.UnicodePlotsBackend() + + # lets just make sure it runs without error + @fact isa(plot(rand(10)), Plots.Plot) --> true +end # The plotlyjs testimages return a connection error on travis: # connect: connection refused (ECONNREFUSED) @@ -105,13 +99,18 @@ end # end -facts("UnicodePlots") do - @fact unicodeplots() --> Plots.UnicodePlotsBackend() - @fact backend() --> Plots.UnicodePlotsBackend() +# facts("Gadfly") do +# @fact gadfly() --> Plots.GadflyBackend() +# @fact backend() --> Plots.GadflyBackend() +# +# @fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyBackend} +# @fact plot(Int[1,2,3], rand(3)) --> not(nothing) +# @fact plot(sort(rand(10)), rand(Int, 10, 3)) --> not(nothing) +# @fact plot!(rand(10,3), rand(10,3)) --> not(nothing) +# +# image_comparison_facts(:gadfly, skip=[4,6,23,24,27], eps=img_eps) +# end - # lets just make sure it runs without error - @fact isa(plot(rand(10)), Plots.Plot) --> true -end