The following
Graphics[Circle[], Axes -> {True, True}, ScalingFunctions -> {Identity, "Reverse"}]
doesn't work
I need "minus" direction go to the right...
The following
Graphics[Circle[], Axes -> {True, True}, ScalingFunctions -> {Identity, "Reverse"}]
doesn't work
I need "minus" direction go to the right...
For Circle[]
(or any graphics primitive symmetric around the origin), you can use custom ticks:
Graphics[Circle[],
Axes -> True, TicksStyle -> 16,
Ticks -> {Charting`ScaledTicks["Reverse"], Automatic}]
You can also cheat by using the graphics primitives as Epilog
in a plotting function that accepts ScalingFunctions
(say, Plot
):
Plot[x, {x, -1, 1}, AspectRatio -> 1, TicksStyle -> 16,
PlotStyle -> None,
PlotRange -> {{-1, 1}, {-1, 1}}, Axes -> True,
ScalingFunctions -> {"Reverse", Identity},
Epilog -> {Circle[]}, ]
In general, you can use ScalingTransform[{-1, 1}]
or ReflectionTransform[{-1, 0}]
on graphics primitives and use custom ticks:
SeedRandom[1]
pnts = RandomReal[{-5, 5}, {10, 2}];
Row[{Graphics[{Opacity[.5], Blue,
Polygon[pnts[[FindShortestTour[pnts][[2]]]]]},
Axes -> {True, True}, TicksStyle -> 16, ImageSize -> 300],
Graphics[{Opacity[.5], Green,
GeometricTransformation[
Polygon[pnts[[FindShortestTour[pnts][[2]]]]], ScalingTransform[{-1, 1}]]},
Axes -> {True, True}, TicksStyle -> 16, ImageSize -> 300]
Graphics[{Opacity[.5], Red,
GeometricTransformation[
Polygon[pnts[[FindShortestTour[pnts][[2]]]]], ScalingTransform[{-1, 1}]]},
Axes -> {True, True}, TicksStyle -> 16, ImageSize -> 300,
Ticks -> {Charting`ScaledTicks["Reverse"], Automatic}]}]
For objects like circles that are readily converted to mathematical functions:
r = 1;
ContourPlot[
x^2 + y^2 == r^2,
{x, -1.05, 1.05}, {y, -1.05, 1.05},
Frame -> False,
Axes -> True,
ScalingFunctions -> {"Reverse", Identity}]
Or
Plot[
{Sqrt[r^2 - x^2], -Sqrt[r^2 - x^2]},
{x, -1.05, 1.05},
PlotStyle -> ColorData[97][1],
AspectRatio -> 1,
ScalingFunctions -> {"Reverse", Identity}]