From f63ee6d79efe81720604dc17d7a14b28853f2280 Mon Sep 17 00:00:00 2001 From: t-bltg <13423344+t-bltg@users.noreply.github.com> Date: Fri, 2 Jul 2021 15:06:36 +0200 Subject: [PATCH] enhance example 55 (#3596) Co-authored-by: t-bltg --- src/examples.jl | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/examples.jl b/src/examples.jl index 5d2e4d80..3fa3f1d7 100644 --- a/src/examples.jl +++ b/src/examples.jl @@ -1169,21 +1169,13 @@ const _examples = PlotExample[ [ :( begin - using LinearAlgebra - scalefontsizes() - scalefontsizes(.5) + using LinearAlgebra + scalefontsizes(.4) - x, y = -6:0.5:10, -8:0.5:8 - function f(x,y) - r = norm([x,y]) - sinc(r / pi) - end + x, y = collect(-6:0.5:10), collect(-8:0.5:8) - args = (x, y, f) - kwargs = Dict( - :xlabel => "x", :ylabel => "y", :zlabel => "z", - :grid => true, :minorgrid => true, :dpi => 200 - ) + args = x, y, (x, y) -> sinc(norm([x, y]) / π) + kwargs = Dict(:xlabel=>"x", :ylabel=>"y", :zlabel=>"z", :grid=>true, :minorgrid=>true) plots = [wireframe(args..., title = "wire"; kwargs...)] @@ -1209,7 +1201,10 @@ const _examples = PlotExample[ )) end - plot(plots..., layout=(@layout [_ ° _; ° ° °; ° ° °]), margin=2Plots.mm) + plt = plot(plots..., layout=(@layout [_ ° _; ° ° °; ° ° °]), margin=0Plots.px) + + resetfontsizes() + plt end ), ],