Skip to content

Commit

Permalink
dont apply the theme forever
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch authored Jul 20, 2023
1 parent 94bab3a commit 4ceb3cd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/examples/plotting_functions/mesh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 4ceb3cd

Please sign in to comment.