If it is a duplicate, I apologize.
I have the function
g[θ_, P_, Q_] :=
Pi/180 (Sin[θ/2]^(2 P - 1) Cos[θ/2]^(2 Q - 1))/
NIntegrate[
Sin[θp/2]^(2 P - 1) Cos[θp/2]^(2 Q - 1), {θp,
0, Pi}]
with
Table[g[θ, i, i], {i, 1, 10}];
Plot[%, {θ, 0, π}, Frame -> True, ImageSize -> 500,
FrameTicks -> {{{0, 0.005, 0.01, 0.015, 0.02, 0.025, 0.03, 0.035},
None}, {{0, Pi/2, Pi}, None}},
PlotLegends ->
Placed[LineLegend[{"P=1,Q=1", "P=2,Q=2", "P=3,Q=3", "P=4,Q=4",
"P=5,Q=5", "P=6,Q=6", "P=7,Q=7", "P=8,Q=8", "P=9,Q=9",
"P=10,Q=10"}, LegendLayout -> {"Column", 2}], {0.78, 0.78}],
FrameLabel -> {Style["θ", 18], Style["g(θ)", 18]},
FrameStyle -> 15, PlotRange -> All]
I get the following plot
My colleagues prefer something like the following graph:
I guess it is possible to Mathematica. But I do not know how. Thanks in advance for any help regarding these matching lines between legend and corresponding curve.