# Mirroring the graph on the negative y axis

Another quick question, I have been trying to plot a phase plot, which has resulted in some issues. I know that there is a negative axis which it is also transposed on. However, when I include negative signs in front of the graph it doesn't want to plot.

My question thus is how do I hold the values on the positive axis whilst also being able to flip it to the negative one. It might help to show the picture to help along it's indeed a phase plot of a double well.

To give an example of what I exactly would want mathematica to do I have attached a handdrawn picture. • hmm, could you please explain a bit more what you're trying to do? I'm not sure what you mean when you say that there is a negative axis it's transposed on. Also if there's code that attempts to solve the problem but doesn't work, could you please include it? and welcome to MMA SE! :) Feb 17, 2021 at 11:05
• Hey thanks! this community has been extremely helpful!. I mainly just want to mirror the image above to the negative yaxis (But also holds the current image so like stacking it up ontop). I can post the code however I have removed the problematic code that cuts out the negative part of the phase graph. Feb 17, 2021 at 11:11
• I have attached a picture of what I meant, which hopefully gives you some insight in what I mean :) Feb 17, 2021 at 11:19

plot = Plot[Evaluate[Piecewise[{{Clip[#[x], {0, 5}], -Pi <= x <= 3 Pi}}, #[Pi]] & /@
{Sin, 1/2 + Sin[#] &, 3/2 + Sin[#] &}],
{x, -3 Pi, 6 Pi}, Filling -> 0] 1. You can use ReflectionTransform on the graphics primitives of plot:

Show[plot,
MapAt[GeometricTransformation[#, ReflectionTransform[{0, 1}]] &, plot, 1],
PlotRange -> All] Alternatively, use ReplaceAll to replace Lines and Polygons with their reflected versions:

plot2  = plot /. primitive : _Line | _Polygon :> {primitive,
GeometricTransformation[primitive, ReflectionTransform[{0, 1}]]} ;

Show[plot2, PlotRange -> All]

same picture


2. Use the option ScalingFunctions:

reflectedplot = Plot[Evaluate[Piecewise[{{Clip[#[x], {0, 5}], -Pi <= x <= 3 Pi}},
#[Pi]] & /@ {Sin, 1/2 + Sin[#] &, 3/2 + Sin[#] &}],
{x, -3 Pi, 6 Pi},
Filling -> 0, ScalingFunctions -> {None, "Reverse"}] Show[plot, reflectedplot, PlotRange -> All] • Also for this example, Show[plot, plot /. {x_Real, y_Real} :> {x, -y}, PlotRange -> All] Feb 17, 2021 at 16:52