It would be easier for us to help you if you can share your PyGMT script even though it doesn’t work as you expected.