Reverse Axis on Plot

Hi! Has anyone had luck reversing an x- or y-axis using PyGMT?

I’ve tried:
fig = pygmt.Figure()
fig.plot(x=[0], y=[0],region=“1720/0/600/0”, projection=‘X15/15’, frame=[‘WSen’,‘afg’],style=“x0.3c”, pen=“1p”)

but get the error message:
GMTCLibError: Module ‘plot’ failed with status code 72:
plot [ERROR]: Option -R parsing failure. Correct syntax:
plot [ERROR]: Offending option -R1720/0/600/0

In essence, I’m trying to produce something similar to the attached figure.

Thanks for your help!

If you look at that example you will see we use negative width to reverse an axis.

1 Like

-R is always using right handed positive axis directions but you reverse them with a negative scale or length,

1 Like

Ah thank you @pwessel! Such an easy fix!