Scaling question

Added by Engelbert 24 days ago

Dear GMT people,

I would like to plot the largest container ports with circles scaled for tonnage. So I've prepared this data file (Shanghai, Singapore, Shenzhen, ..):

122.07    30.62    36537000
103.75    1.27    30922300
113.87    22.48    24204000
121.83    29.93    20620000

The psxy manpages simply states To plot the xyz values in the file quakes.xyzm as circles with size given by the magnitude [..] using the CPT rgb.cpt on a linear map, use

gmt psxy quakes.xyzm -R0/1000/0/1000 -JX6i -Sc -Crgb -B200 > map.ps"

But sadly I'm a bloody noob and just don't get it replicated. Here is my source code:

ps=example.ps
proj=Kf0
scale=9i
center=45g30
gmt set FONT_ANNOT_PRIMARY 10p FONT_TITLE 18p

pscoast -Rg -J$proj/$scale -B$center -B+t"Largest container ports worldwide" \
    -Gwheat -Slightblue \
    -Dc -A2000 -K -Y2.75i > $ps
psxy ports.xyz -Rg -J$proj/$scale -Sc -O -K >> $ps
ps2pdf example.ps example.pdf

Thanks in advance for any help.


Replies (5)

RE: Scaling question - Added by Paul 24 days ago

Your tonnage makes for poor symbol diameters (e.g., 36537000 cm) so you probably want to scale them to something reasonable. For instance, a scale of 1e-8 would change 36537000 to 0.365 cm. So run psxy as you do but tell it to get the first 3 columns but scale the third column accordingly: -i0,1,2+s1e-8

RE: Scaling question - Added by Engelbert 12 days ago

Thank you very much. In the moment I'm fighting with GDAL ("ERROR 1: GMT driver has no vector capabilities."), but this is not your department.

RE: Scaling question - Added by Andreas 12 days ago

I think they changed the OGR/GMT driver name from GMT to OGR_GMT in a (recent) version.

RE: Scaling question - Added by Engelbert 10 days ago

Thanks for the OGR_GMT hint.

psxy CN.gmt -Rg -J$proj/$scale -A -O -K >> $ps

works well for plotting some lines. But how do I change the color and line thickness?

(1-5/5)