fix example 25

This commit is contained in:
Simon Christ 2022-03-17 12:04:47 +01:00
parent 79638b7789
commit afe24f46bc
2 changed files with 8 additions and 6 deletions

View File

@ -1278,7 +1278,7 @@ const _examples = PlotExample[
# Some constants for PlotDocs and PlotReferenceImages # Some constants for PlotDocs and PlotReferenceImages
_animation_examples = [2, 31] _animation_examples = [2, 31]
_backend_skips = Dict( _backend_skips = Dict(
:gr => [], :gr => [30],
:pyplot => [2, 25, 30, 31, 49, 55, 56], :pyplot => [2, 25, 30, 31, 49, 55, 56],
:plotlyjs => [2, 21, 24, 25, 30, 31, 49, 50, 51, 55, 56], :plotlyjs => [2, 21, 24, 25, 30, 31, 49, 50, 51, 55, 56],
:pgfplotsx => [ :pgfplotsx => [

View File

@ -13,7 +13,6 @@ function replace_rand!(ex::Expr)
end end
function fix_rand!(ex) function fix_rand!(ex)
replace_rand!(ex) replace_rand!(ex)
pushfirst!(ex.args[1].args, :(rng = StableRNG(PLOTS_SEED)))
end end
function image_comparison_tests( function image_comparison_tests(
@ -39,10 +38,13 @@ function image_comparison_tests(
# test function # test function
func = (fn, idx) -> begin func = (fn, idx) -> begin
expr = Expr(:block) eval(:(rng=StableRNG(PLOTS_SEED)))
append!(expr.args, example.exprs) for the_expr in example.exprs
fix_rand!(expr) expr = Expr(:block)
eval(expr) push!(expr.args, the_expr)
fix_rand!(expr)
eval(expr)
end
png(fn) png(fn)
end end