Adding labels to surfaces in the same figure

gnicolosi
Tue, 19 Apr 2022 20:49:23 +0000
Visualization

Hi all, how do I add labels to the surfaces below? Using label= as when plotting curves in 2d does not work. There’s very few information on attributes to surface() and I can’t find a solution anywhere else for this simple issue.

That’s how I created it:

using Plots, LaTeXStrings
surface(0:0.05:4, 0.05:0.1:0.95, uₜᵣᵤₑ, color=:blues)
surface!(0:0.05:4, 0.05:0.1:0.95, uₚₗₒₜ, zlabel=L"$u(t,x_0)$", colorbar=false, camera=(60,30), fillalpha=0.8)
title!(L"Exact and Approximated Surfaces $M=2$")

All I want is a tiny box in the corner indicating what each surface represents. Let me know if I am not following some best practice when it comes to plotting.

Thank you,

5 posts - 3 participants