echo off rem this does subsets with one argument rem Run by typing vulplot2.bat gmtset BASEMAP_TYPE PLAIN gmtset PAGE_ORIENTATION PORTRAIT gmtset PAPER_MEDIA archC+ set range=1/3/1/3 set annot1=f0.5a0.5/f0.5a0.5WeSn set xpos1=4.25 set ypos1=4.5 set scale=-7/7 set infile=example.csv set psfile=vp_%1.ps set cptfile=vulplot.cpt psbasemap -P -R%range% -Jx%scale% -K -B%annot1% -X%xpos1% -Y%ypos1% > %psfile% psxy radius_1.dat -Jx -R -O -K -M -W0.75p/200/200/200ta >> %psfile% psxy radius_2.dat -Jx -R -O -K -M -W0.75p/200/200/200ta >> %psfile% psxy radius_3.dat -Jx -R -O -K -M -W0.75p/200/200/200ta >> %psfile% psxy radius_4.dat -Jx -R -O -K -M -W0.75p/200/200/200ta >> %psfile% psxy radius_5.dat -Jx -R -O -K -M -W0.75p/200/200/200ta >> %psfile% psxy segments.dat -Jx -R -O -K -M -W0.75p/200/200/200ta >> %psfile% gawk -F, "{if (($5+$7)/2<=2 && $8==GROUP) print $4, $6, .50, .40, S; else if (($5+$7)/2>2 && ($5+$7)/2<3.5 && $8==GROUP) print $4, $6, 1.5, .38, C; else if (($5+$7)/2>=3.5 && $8==GROUP) print $4, $6, 2.5, .40, T}" S="s" C="c" T="t" GROUP=%1 %infile% | psxy -C%cptfile% -W0.5/0/0/0 -S -O -K -R -Jx -N >> %psfile% gawk -F, "{if ($8==GROUP) print $4, $6, 7, 0, 1, CM, $9 }" CM="CM" GROUP=%1 %infile% | pstext -G0/0/0 -O -K -R -Jx -N >> %psfile% echo 2 .8 16 0 15 CM (High) Productivity Score (Low) | pstext -R%range% -Jx -O -K -N >> %psfile% echo 3.3 2 16 90 15 CM (Low) Susceptibility Score (High) | pstext -R%range% -Jx -O -K -N >> %psfile% echo 1.5 0.5 | psxy -St0.4 -G255/0/0 -W0.5/0/0/0 -N -O -K -R -Jx >> %psfile% echo 1.5 0.6 | psxy -Sc0.38 -G255/255/0 -W.5/0/0/0 -N -O -K -R -Jx >> %psfile% echo 1.5 0.7 | psxy -Ss0.4 -G0/255/0 -W.5/0/0/0 -N -O -K -R -Jx >> %psfile% echo 1.45 0.7 10 0 15 LM Data quality high | pstext -R%range% -Jx -O -K -N >> %psfile% echo 1.45 0.6 10 0 15 LM Data quality medium | pstext -R%range% -Jx -O -K -N >> %psfile% echo 1.45 0.5 10 0 15 LM Data quality low | pstext -R%range% -Jx -O -N >> %psfile% echo Finished with file %psfile%