I’m trying to figure out how to get pscoast to plot in 3d perspective mode. What I get makes no sense at all to me - the b flag boundary looks fine (i.e. the lat lon numbers are in the correct plane) but then the boundary bars are at a completely different orientation. What is going on?
#!/usr/bin/perl
$psfn = “fig.ps”;
system “rm $psfn\n”;
system “rm gmt.history\n”;
$minlat = 3;
$maxlat = 10;
$minlon = -80;
$maxlon = -71;
$rflag2 = “-R$minlon/$maxlon/$minlat/$maxlat”;
$bflag = “-Bf1a2/f1a2”;
system “gmt pscoast $rflag2 -JM6i -S255 -p155/25/0 $bflag > $psfn\n”;
Joaquim
September 19, 2025, 9:49pm
2
Why don’t you post a simple one-liner that can be run in any OS? You guys needless post unix scripts and I (Win user) ignore them.
gmt pscoast -R-80/-71/3/10 -JM6i -S255 -p155/25/0 -Bf1a2/f1a2 > test.ps
Joaquim
September 19, 2025, 10:05pm
4
See? So much better. And even better (not painting ocean as white too)
gmt pscoast -R-80/-71/3/10 -JM6i -S155 -p155/25/0 -Bf1a2/f1a2 -png lixo
This is what I get - but I think the difference is that I’m outputting to ps and opening in illustrator, and you’re outputting to png.
It’s even wackier if I add in coastlines:
gmt pscoast -R-80/-71/3/10 -JM6i -S155 -W2 -p155/25/0 -Bf1a2/f1a2 > test.ps
not confirming this issue.
can open test.ps using gv or xreader, looks properly, same way as Joaquim’s png above.
Joaquim
September 21, 2025, 10:31pm
8
Confess that I have no idea of where that behavior is coming from.
seisman
September 22, 2025, 1:51am
9
I also can’t reproduce the issue. Please confirm that you’re using the latest GMT version.
I also can’t reproduce the issue in ubuntu.
I’m using GMT 6.5.0. But it sounds like it’s an illustrator problem? Maybe we add it to the list, along with the greyed out NaNs?
Joaquim
September 22, 2025, 2:41pm
12
When you do like in my example the PS file is converted to png by ghostscript. There is no Illustrator involved in the process.