This question is based on the answers provided here and here. Basically, I have the following Mathematica code to calculate the Lyapunov exponents as a function of Temperature:
$Assumptions = {r \[Element] Reals, r >= 0, rh \[Element] Reals,
rh > 0};
S[rh_] := [Pi] rh^2
M[rh_, qe_, qm_] =
1/2 Sqrt[[Pi]/S[rh]] (S[rh]^2/[Pi]^2 + S[rh]/[Pi] + qe^2 +
qm^2) // Simplify;
qe = SolveValues[[Phi]e == q (1/rh - 1/r), q][[1]] // Simplify;
f[r_, rh_, qm_, [Phi]e_] =
1 + r^2/l^2 - (2 M[rh, qe, qm])/r + (qe^2 + qm^2)/r^2 // Simplify;
G[rh_, qm_, [Phi]e_] =
1/(4 [Pi]^2) Sqrt[[Pi]/S[rh]] (3 [Pi]^2 qm^2 -
S[rh]^2 + [Pi] S[rh] (1 - [Phi]e^2)) // Simplify;
T[rh_, qm_, [Phi]e_] = (-[Pi]^2 qm^2 +
3 S[rh]^2 + [Pi] (S[rh] -
S[rh] [Phi]e^2))/(4 ([Pi] S[rh])^(3/2)) // Simplify;
Veff[r_] = f[r, rh, qm, [Phi]e] (L^2/r^2 + 1) // FullSimplify;
eqn = L^2 == (r0^3 D[f[r0, rh, qm, [Phi]e],
r0])/(2 f[r0, rh, qm, [Phi]e] -
r0 D[f[r0, rh, qm, [Phi]e], r0]) /. r -> r0 // FullSimplify;
sol = Block[{l = 1, L = 20, [Phi]e = 3/5}, Solve[eqn, r0, Reals]];
l = 1; L = 20; [Phi]e = 3/5;
[Lambda][rh_, qm_, [Phi]e_] =
1/2 Sqrt[(r0 D[f[r0, rh, qm, [Phi]e], r0] -
2 f[r0, rh, qm, [Phi]e])*Veff''[r0]] /. r -> r0 /. sol //
Simplify;
Off[General::munfl, Less::nord]
I wished to colour-code the plot like one of my previous works as provided here:
for which I tweaked the original code to something like this:
qm = 0.05;
(tp1 = Evaluate[{#[[1]], #} & /@ (\[Lambda][rh1 = (rh /. #[[2]]),
qm, \[Phi]e][[{3, 5}]])] &@
Maximize[{T[rh, qm, \[Phi]e], 0.01 < rh < 1}, rh] //
FullSimplify) // N;
(tp2 = Evaluate[{#[[1]], #} & /@ (\[Lambda][rh2 = (rh /. #[[2]]),
qm, \[Phi]e][[{3, 5}]])] &@
Minimize[{T[rh, qm, \[Phi]e], rh1 < rh < 1}, rh] //
FullSimplify) // N;
pplt1 = ParametricPlot[
Evaluate[{T[rh, 0.05, 0.6], #} & /@ ([Lambda][rh, 0.05,
0.6][[{3, 5}]])], {rh, 0.01, 2},
PlotRange -> {{0, 0.4}, {0.1, 4}}, AspectRatio -> 0.5,
Exclusions -> All, PlotPoints -> 100, ImageSize -> 800,
PlotTheme -> {"Scientific", "NeonColor"},
FrameLabel -> {"Temperature [Rule]", "Lyapunov Exponent [Rule]"},
LabelStyle -> {Bold, Black, 22}, PlotStyle -> Thickness[0.004],
ColorFunction ->
Function[{T, [Lambda], rh},
If[rh <= rh1, Blue, If[rh <= rh2, Red, Green]]],
ColorFunctionScaling -> False,
Prolog -> {{Gray, Dashing[0.008], Line[{tp1, {tp1[[1]], 0}}],
Line[{tp2, {tp2[[1]], 0}}]}, {Gray, Thick, Dashing[0.001],
Circle[tp1, {0.005, .1}], Circle[tp2, {0.005, .1}]}}];
P1 = Legended[pplt1,
Placed[SwatchLegend[{Blue, Red, Green}, {"Small BH",
"Intermediate BH", "Large BH"}, LabelStyle -> {Bold, Black, 20},
LegendMarkers -> "SphereBubble", LegendMarkerSize -> 20,
LegendFunction -> (Framed[#, RoundingRadius -> 10,
FrameStyle -> None, Background -> GrayLevel[0.95]] &),
LegendLabel ->
Placed["Black Holes", Left,
Rotate[Style[#, 16], 90 Degree] &]], {0.2, .45}]]
But it doesn't provide me with a colour-coded plot like the one I had previously and gives me this instead, along with lots of error messages:



