From 4ceb3cdcbcc0a62c972fd67377e6e99f5016127a Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 20 Jul 2023 12:06:37 +0200 Subject: [PATCH] dont apply the theme forever --- docs/examples/plotting_functions/mesh.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/examples/plotting_functions/mesh.md b/docs/examples/plotting_functions/mesh.md index 693c9e9b508..60d1e86c04d 100644 --- a/docs/examples/plotting_functions/mesh.md +++ b/docs/examples/plotting_functions/mesh.md @@ -55,12 +55,13 @@ normal_msh = GeometryBasics.normal_mesh(msh) # explicitely create mesh with norm colors = [:red, :green, :blue, :orange] # Axis3 currently doesn't support setting lights, so we just change them in the theme! -set_theme!(lightposition=Vec3f(1, -1, 2), ambient=RGBf(0.2, 0.2, 0.2)) -f = Figure() -# normals get generated automatically in the meshcall in both cases, since Makie@0.19.7 -mesh(f[1, 1], msh; color=colors, axis=(; type=Axis3, aspect=:data, title="No shading"), shading=false) -mesh(f[2, 1], normal_msh; color=colors, axis=(; type=Axis3, aspect=:data, title="Automatic normals")) -f +with_theme(lightposition=Vec3f(1, -1, 2), ambient=RGBf(0.2, 0.2, 0.2)) do + f = Figure() + # normals get generated automatically in the meshcall in both cases, since Makie@0.19.7 + mesh(f[1, 1], msh; color=colors, axis=(; type=Axis3, aspect=:data, title="No shading"), shading=false) + mesh(f[2, 1], normal_msh; color=colors, axis=(; type=Axis3, aspect=:data, title="Automatic normals")) + f +end ``` \end{examplefigure}