# Combine two mirror plots

I am trying to get something like this: It resembles the political compass. There are 4 axis, all of them always positive, and two curves are shown. One of them obeys the equation:

$d(M)=M^{0.2}$

and for the other:

$d(M)=M^{-0.2}$.

There are also two horizontal lines for $d=1$. And the origin of the graph is at $(1,0)$. The two curves are flipped like the picture. It would look nicer if the left and right sides of the graph had different background colors, like red and blue. How can I do that?

• The bottom right curve is $M^{-0.2}$ flipped around $d=1$ and the top left curve is $M^{0.2}$ flipped around $M=0$, but I am chopping off the gap and only showing the curves for $M>1$. I can do all the flipping without setting the origin to $(1,0)$, but it looks a little weird. – Rodrigo May 25 '17 at 23:22

This, in fact, turns out to be possible. By combining s0rce's answer from here with Jens' plotGrid function from here, we get:

pl1 = Plot[
m^0.2, {m, 0, 5},
ScalingFunctions -> {"Reverse", Identity},
AxesOrigin -> {1, 0},
PlotRange -> {{1, 5}, {0, 2}},
Epilog -> {Dashed, Line[{{1, 1}, {-5, 1}}]},
Background -> LightBrown
]

pl2 = Plot[{}, {x, 0, 5},
PlotRange -> {{1, 5}, {0, 2}},
AxesOrigin -> {1, 0},
Axes -> True,
Epilog -> {Dashed, Line[{{1, 1}, {5, 1}}]},
Background -> LightOrange
]

pl3 = Plot[{}, {x, 0, 5},
PlotRange -> {{1, 5}, {0, 2}},
ScalingFunctions -> {"Reverse", "Reverse"},
AxesOrigin -> {1, 0},
Axes -> True,
Epilog -> {Dashed, Line[{{1, -1}, {-5, -1}}]},
Background -> LightYellow
]

pl4 = Plot[
m^(-0.2), {m, 1, 5},
ScalingFunctions -> "Reverse",
AxesOrigin -> {1, 0},
PlotRange -> {{1, 5}, {0, 2}},
Epilog -> {Dashed, Line[{{1, -1}, {5, -1}}]},
Background -> LightBlue
]

plotGrid[{{pl1, pl2}, {pl3, pl4}}, 500, 300, ImagePadding -> 10] • It is beautiful, thanks :D – Rodrigo May 25 '17 at 23:43
• Ops, I think I have a problem. Mathematica won't accept the ScalingFunctions option :( – Rodrigo May 25 '17 at 23:46
• @RodrigoGalvão What version of Mathematica? – C. E. May 25 '17 at 23:47
• Ok, I got the correct output now :) – Rodrigo May 25 '17 at 23:57
• @RodrigoGalvão I agree, there is something wrong in Mathematica 10. If you need to render this plot, then I would suggest using Wolfram Open Cloud. It uses the latest Mathematica version and you can get access for free. (I tried it just now to make sure that it works there.) – C. E. May 26 '17 at 0:58