7
$\begingroup$

This question already has an answer here:

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]

enter image description here

What I want is the following figure. How can I do it? Thank you in advance.

enter image description here

$\endgroup$

marked as duplicate by José Antonio Díaz Navas, Kuba Feb 27 '18 at 6:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

12
$\begingroup$

You can use the option ScalingFunctions to achieve what you want:

Plot[
    2 Sin[x]+x,
    {x,0,15},
    Frame->True,
    ScalingFunctions->{Identity,"Reverse"}
]

enter image description here

$\endgroup$
0
$\begingroup$

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}}]

enter image description here

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.