add legendtitle to example
This commit is contained in:
parent
4106161aa8
commit
a12f601b9c
@ -119,7 +119,7 @@ PlotExample("Line styles",
|
|||||||
styles = reshape(styles, 1, length(styles)) # Julia 0.6 unfortunately gives an error when transposing symbol vectors
|
styles = reshape(styles, 1, length(styles)) # Julia 0.6 unfortunately gives an error when transposing symbol vectors
|
||||||
n = length(styles)
|
n = length(styles)
|
||||||
y = cumsum(randn(20,n),1)
|
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)]
|
end)]
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
@ -7,19 +7,6 @@ srand(1234)
|
|||||||
default(show=false, reuse=true)
|
default(show=false, reuse=true)
|
||||||
img_eps = isinteractive() ? 1e-2 : 10e-2
|
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
|
facts("GR") do
|
||||||
@fact gr() --> Plots.GRBackend()
|
@fact gr() --> Plots.GRBackend()
|
||||||
@fact backend() --> Plots.GRBackend()
|
@fact backend() --> Plots.GRBackend()
|
||||||
@ -35,6 +22,13 @@ facts("PyPlot") do
|
|||||||
image_comparison_facts(:pyplot, eps=img_eps)
|
image_comparison_facts(:pyplot, eps=img_eps)
|
||||||
end
|
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:
|
# The plotlyjs testimages return a connection error on travis:
|
||||||
# connect: connection refused (ECONNREFUSED)
|
# connect: connection refused (ECONNREFUSED)
|
||||||
@ -105,13 +99,18 @@ end
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
|
|
||||||
facts("UnicodePlots") do
|
# facts("Gadfly") do
|
||||||
@fact unicodeplots() --> Plots.UnicodePlotsBackend()
|
# @fact gadfly() --> Plots.GadflyBackend()
|
||||||
@fact backend() --> Plots.UnicodePlotsBackend()
|
# @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
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user