I want to flip a figure vertically but label the y-axis inversely. Please see this example:
Plot[2 Sin[x] + x, {x, 0, 15}, Frame -> True, Axes -> False]
What I want is the following figure. How can I do it? Thank you in advance.
You can use the option ScalingFunctions
to achieve what you want:
Plot[
2 Sin[x]+x,
{x,0,15},
Frame->True,
ScalingFunctions->{Identity,"Reverse"}
]
Here is an alternative way to do it.
Plot[-(2 Sin[x] + x), {x, 0, 15}, Frame -> True, Axes -> False,
FrameTicks -> {{Transpose@{Range[0, -15, -5], Range[0, 15, 5]},
None}, {Automatic, None}}]