# Parametric Plot in different graphs

i would like to plot the function of a parametric differential system below ideal in separate graphs. My code is

q0 = 80;
Γ = 4/3;
μ = 1/1000;
l = μ/2;
ε0 = b2*60;
ψ0 = 1/5;
Rinit = 2/1000;
Finit = 12/10;
Δinit = 2;

smax = 1.5 10^-8;

sM0[s_] := Δ0[s] + q0 Δ0[s]^(2 - Γ)
h0[s_] := Sqrt[1 - (R[s]* μ)/(l^2 + R[s]^2)]
M0[s_] := Sqrt[Δ0[s] + q0 Δ0[s]^(2 - Γ)]
sM0[s_] := Δ0[s] + q0 Δ0[s]^(2 - Γ)

U0[s_] := (4 π ψ0 (ε0^2 - h0[s]^2 (q0 Δ0[s]^(1 - Γ) + 1)^2))^(1/2)

G[s_] := M0[s]/Sqrt[U0[s]]
sG[s_] := sM0[s]/U0[s]
γ0[s_] := ε0/((q0 Δ0[s]^(1 - Γ) + 1)*h0[s]);
γu0[s_] := Sqrt[γ0[s]^2 - 1];
γu1[s_] := Δ0[s] Sqrt[γ0[s]^2 - 1];

Dsonic[s_] := h0[s]^2 (q0 Δ0[s]^(1 - Γ) + 1)^3
ndΔ0[s_] := (q0 Δ0[s] + Δ0[s]^Γ)
dF[s_] := (
4 π R[s] (l^2 + R[s]^2) (h0[s]^2) (
sG[s]^2) )/((l^2 + R[s] (R[s] - μ)) (h0[s]^2 - sM0[s])) ndΔ0[s] -
4 l^2 R[s]^3  μ + R[s] (-l^4 + R[s]^4) μ F[s]

xmin = 3/10;
xmax = 6/10;
dx = 1/10;

sol3 = ParametricNDSolve[{F'[s] == dF[s], Δ0'[s] == ndΔ0[s],
R'[s] == Dsonic[s],  F[0] == Finit, Δ0[0] == Δinit,
R[0] == Rinit}, {F, Δ0, R}, {s, 0, smax}, {b2},
WorkingPrecision -> 32];


i am using parametric plot but apparently not correctly

ParametricPlot[
Evaluate@Table[{{(2 (x - γu0[s]))/γu1[s]*
G[s]^2, (1 - (2 (x - γu0[s]))/(γu1[s] (R[s]^2 + l^2))*
G[s]^2) (1 - (2 (x - γu0[s]))/(γu1[s] (R[s]^2 + l^2))*
G[s]^2)} /. {R[s] :> R[b2][s], Δ0[s] :> Δ0[b2][s],
F[s] :> F[b2][s]}} /. sol3, {s, 0, smax}], {b2, 1, 2}, {x,xmin, xmax},
AspectRatio -> 1]


I would like to get two graphs, not in the same plot, for two values of parameter b2. b2=1 and b2=2; Thank you

This is what it should look like but i can't do it using b2 as a parameter. I have just plotted with two different values saparetely

Top one is for b2=1 and bottom for b2=2

expr = {(2 (x - γu0[s]))/γu1[s]*G[s]^2,
(1 - (2 (x - γu0[s]))/(γu1[s] (R[s]^2 + l^2))*
G[s]^2) (1 - (2 (x - γu0[s]))/(γu1[s] (R[s]^2 + l^2))*G[s]^2)} /.
{R[s] :> R[b2][s], Δ0[s] :> Δ0[b2][s], F[s] :> F[b2][s]} /. sol3;

Column @
Table[
Show[
ParametricPlot[expr, {s, 0, smax}, {x, xmin, xmax},
BoundaryStyle -> None],
ParametricPlot[Evaluate[expr /. {x -> #} & /@ Range[.3, .6, .1]],
{s, 0, smax},
PlotLegends -> Placed[LineLegend[Automatic, Range[.3, .6, .1],
LegendLabel -> "x"], {.42, .6}]],
AspectRatio -> 1, ImageSize -> Medium, PlotLabel -> PromptForm["b2", b2]],
{b2, 1, 2}]


Update: "to get rid of the blue background..."

Column @
Table[
ParametricPlot[Evaluate[expr /. {x -> #} & /@ Range[.3, .6, .1]],
{s, 0, smax},
Axes -> False, Frame -> True,
PlotLegends ->
Placed[LineLegend[Automatic, Range[.3, .6, .1],
LegendLabel -> "x"], {.42, .6}], AspectRatio -> 1,
ImageSize -> Medium, PlotLabel -> PromptForm["b2", b2]],
{b2, 1, 2}]


• Perfect! Thank you! Any idea how to get rod of the blue background inside the graph? Commented Jul 6, 2023 at 10:45
• @Agaph, please see the update.
– kglr
Commented Jul 6, 2023 at 11:00
Column[
Table[
ParametricPlot[Evaluate[
{(2 (x - γu0[s]))/γu1[s]*G[s]^2,
(1 - (2 (x - γu0[s]))/(γu1[s] (R[s]^2 + l^2))*
G[s]^2) (1 - (2 (x - γu0[s]))/(γu1[
s] (R[s]^2 + l^2))*G[s]^2)} /.
{R[s] :>
R[b2][s], Δ0[s] :> Δ0[b2][s],
F[s] :> F[b2][s]} /. sol3],
{s, 0, smax}, {x, xmin, xmax},
PlotLabel -> StringForm[" = ", Subscript[b, 2], b2],
AspectRatio -> 1,
ImageSize -> Medium],
{b2, 1, 2}]]


• Thank you for your answer, but it seems something is wrong. I upload two graphs of what it should look like for two different values of b2. Commented Jul 6, 2023 at 8:48
• You have already received answers that address your comment. However, your question made no reference to anything other than the need for two separate plots. If you already had images of what you wanted, that should have been included in the initial question along with any desired modifications (e.g., remove filling). Answers are only as good as the question. Commented Jul 6, 2023 at 14:50

Maybe want an animation?

expr = {(2 (x - γu0[s]))/γu1[s]*
G[s]^2, (1 - (2 (x - γu0[s]))/(γu1[
s] (R[s]^2 + l^2))*
G[s]^2) (1 - (2 (x - γu0[s]))/(γu1[
s] (R[s]^2 + l^2))*G[s]^2)} /. {R[s] :>
R[b2][s], Δ0[s] :> Δ0[b2][s],
F[s] :> F[b2][s]} /. sol3;
draw[values_] :=
Block[{b2 =
values}, {ParametricPlot[expr, {s, 0, smax}, {x, xmin, xmax},
AspectRatio -> 1, PlotRange -> All],
ParametricPlot[
Table[expr, {x, {.3, .4, .5, .6}}] // Evaluate, {s, 0, smax},
AspectRatio -> 1, PlotRange -> All]} // Show]

{draw[1], draw[1.1], draw[2]}
Manipulate[draw[values], {values, 1, 2, .1}]


• @kglr Thank you. Commented Jul 6, 2023 at 11:05
• Thank you very much Commented Jul 6, 2023 at 11:05