# How to rotate the curve [closed]

How can I rotate this curve

It's supposed to be like this

UPDATE:

I would like to show the "Blue" curve instead of the "Red" Curve. Even though I changed the equation in wolfram, the place of the curve did not move.

• If you really want to rotate everything, you can do Rotate[Plot[…], 90°] Feb 1 at 14:15
• I'm sorry, I just want to rotate the curve Feb 1 at 14:21
• Then something like ParametricPlot[{Sin[x],x},{x,0,10}]? Feb 1 at 14:25
• People here generally like users to post code as copyable Mathematica code instead of just images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find the meta Q&A, How to copy code from Mathematica so it looks good on this site, helpful Feb 1 at 14:46
• Welcome to Mathematica S.E. To start: 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, since the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) consider accepting the answer, if any, that solves your problem, by clicking checkmark sign, 4) give help too, by answering questions in your areas of expertise.
– bmf
Feb 3 at 3:12

Clear["Global*"]


In ParametricPlot you just interchange the coordinates. Both shown for comparison.

ParametricPlot[
{{t, Sqrt[10 + t^2]}, {Sqrt[10 + t^2], t}},
{t, -20, 30},
PlotStyle -> {Red, Blue},
PlotLegends -> Placed[
{HoldForm[y == Sqrt[10 + x^2]],
HoldForm[x == Sqrt[10 + y^2]]},
{.6, .9}]]


Export[
"Test.GIF",
With[
{
f=Function[{x}, Sqrt[10+x^2]]
},
Animate[
ParametricPlot[
RotationTransform[angle][{f[x],x}]
, {x, -10,10}
, AspectRatio -> 1
, PlotRange -> {{-10,10}, {-10,10}}
]
, {angle, 0, 2Pi, Pi/16}
]
]
]


Using ReflectionTransform:

Clear[f, g, x, y]
f[x_] := Sqrt[x^2 + 10]
g[x_] := Sqrt[x^2 + 50]
p1 = Plot[{f[x], g[x]}, {x, -10, 10}];
Show[p1, Plot[x, {x, -15, 15}, PlotStyle -> {Dashed, Black}],
p1 /. L_Line :> {GeometricTransformation[L,
ReflectionTransform[{-1, 1}]]},
PlotRange -> {{-15, 15}, {-15, 15}}
, AspectRatio -> Automatic
, AxesOrigin -> {0, 0}
]


Using ContourPlot:

ContourPlot[
{y == f[x], x == f[y]} // Evaluate
, {x, -15, 15}, {y, -15, 15}
, Axes -> True
, AxesStyle -> Dashed
]


To get both curves:

ContourPlot[
{{y == f[x], y == g[x]}, {x == f[y], x == g[y]}} // Evaluate
, {x, -15, 15}, {y, -15, 15}
, ContourStyle -> {ColorData[97][1], ColorData[97][2]}
, Axes -> True
, AxesStyle -> Dashed
]

• By total chance I was on the ReflectionTransform doc page and then this question popped up.
– Syed
Feb 1 at 14:48
• [In your ReflectionTransform plot] Is there a possible way to remove the upper curves and just show the curves on the right-side of the graph? Feb 1 at 15:27
• In the Show command, don't include p1. The Show command is showing three entities; the original plot, the dashed lines and the transformed plot. Use as required.
– Syed
Feb 1 at 15:31
• Ahh thanks I got it! How about the dashed line? Feb 1 at 15:44
• Show[p1 /. L_Line :> {GeometricTransformation[L, ReflectionTransform[{-1, 1}]]}, PlotRange -> {{-15, 15}, {-15, 15}}, AspectRatio -> Automatic, AxesOrigin -> {0, 0}]`
– Syed
Feb 1 at 15:48