Oblique Mercator in Portrait orientation

I cannot plot in oblique Mercator projection in Portrait orientation. It is always landscape even I set “-P” or use “gmtset PS_PAGE_ORIENTATION portrait”.

gmt pscoast -R137/-53/142/-49r -JOa140/-51/90/4i -B1g1 -Glightgray -W0.25p -P > george_v.ps

Hi Matt, welcome to the forum! This works for me in GMT 6. Not really sure what is happening for you. Can you post the generated plot here? You can drag and drop files/images to attach them to your post.

I am using Mac. I open the .ps using Preview. Could this be the problem?

Matt it must be a preview issue (it’s always preview issues on Macs :wink:) because the ps file you sent me displays in portrait with the ghost and if you open it with a text editor you’ll see

%%BoundingBox: 0 0 612 792
%%HiResBoundingBox: 0 0 612 792             
%%Title: GMT v5.4.2 (r18461) [64-bit] Document from pscoast
%%Creator: GMT5
%%For: unknown
%%DocumentNeededResources: font Helvetica
%%CreationDate: Thu Jul  9 09:21:19 2020
%%LanguageLevel: 2
%%DocumentData: Clean7Bit
%%Orientation: Portrait
%%Pages: 1

time to upgrade to GMT 6.1?

I updated to GMT 6.1. There is still problem with Oblique Mercator. Try the following. You will see the problem. The Oblique Mercator is supposed to rotate the lat lon to lon lat.

#!/usr/bin/env bash

gmt begin portrait_oblique_Mercator
gmt set PS_MEDIA letter PS_PAGE_ORIENTATION portrait
gmt coast -R137/-53/142/-49r -JOa140/-51/90/4i -B1g1 -Glightgray -W0.25p
gmt end

gmt begin protrait_Mercator
gmt set PS_MEDIA letter PS_PAGE_ORIENTATION portrait
gmt coast -R137/-53/142/-49r -JM4i -B1g1 -Glightgray -W0.25p
gmt end

Hi Matt-

PS_MEDIA and PS_PAGE_ORIENTATION are GMT classic settings that are not used in GMT modern mode except when strict PostScript output is required. For all other formats (here pdf, but all rasters) we start with a 10x10 meter page and crop to the plot.
Anyway, that is not the issue you raised. Looking at your command, you use -JOa140/-51/90/4i, which says let the great circle from 140/-51 with azimuth 90 be the new oblique equator. Well, that is what you got, no? If you wanted to rotate by 90 degrees then specifying an azimuth of 0 or 180 is probably required, but then you also need to adjust what your corners are.

Did you see my comment about your azimuth being wrong for what you say you want to achieve?

I didn’t realize what you meant until now. So the corners should be the corners after rotation. Now I got it. Thanks.

Yes, it is not very convenient but that is how it goes…