1
$\begingroup$

I have a plot with the abscissa reversed and I want to add a point.

Plot[1000, {Trev, 1/800, 1/500}, 
 Prolog -> {Pink, Point@{1/700, 1000}}, 
 ScalingFunctions -> {"Reverse", Identity}, AxesOrigin -> {1/500, 0}, 
 GridLines -> Automatic]

With the "Reverse" replaced by Identity it works fine. Is there a way to add the point(s) in the reversed axis plot?

$\endgroup$

3 Answers 3

3
$\begingroup$

With the "Reverse" replaced by Identity it works fine

With x-axis reversed, the point will be at -x.

Plot[1000,
 {Trev, 1/800, 1/500},
 ScalingFunctions -> {"Reverse", Identity},
 PlotRange -> All,
 AxesOrigin -> {1/500, 0},
 GridLines -> Automatic,
 Epilog -> {Pink, PointSize[0.02], Point@{-1/700, 1000}}
 ]

enter image description here

$\endgroup$
2
$\begingroup$
Show[
 Plot[1000, {Trev, 1/800, 1/500}, 
  ScalingFunctions -> {"Reverse", None}, 
  AxesOrigin -> {1/500, 0}, 
  GridLines -> Automatic],
 ListPlot[{{1/700, 1000}},
  PlotMarkers -> Style["●", 10, Pink],
  ScalingFunctions -> {"Reverse", None}]]

enter image description here

$\endgroup$
1
$\begingroup$

You can also apply ReflectionTransform[{-1, 0}] to the coordinates of primitives in Epilog/Prolog:

Plot[1000, {Trev, 1/800, 1/500}, 
 Epilog -> {Pink, PointSize[Large], 
   Point @ ReflectionTransform[{-1, 0}][{1/700, 1000}]}, 
 ScalingFunctions -> {"Reverse", Identity}, 
 AxesOrigin -> {1/500, 0}, 
 GridLines -> Automatic]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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