Scaling question

Added by Engelbert 7 months 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 >"

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

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

Thanks in advance for any help.

Replies (5)

RE: Scaling question - Added by Paul 7 months 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 6 months 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 6 months 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 6 months 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?