物探论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1711|回复: 9

[GMT] A simple colored map of the U.S. with symbols and texts

[复制链接]
匿名
匿名  发表于 2013-4-20 16:34:19 |阅读模式
######## Example A1
### Step 1: Remove the exiting file named tmp.ps, if any. Don't
# be alarmed by the warning message "tmp.ps: No such file or directory"   
rm tmp.ps
### Step 2: make a basemap
psbasemap -R-120/-60/20/50 -JM5 -Ba30/a15 -P -K -X1.5 -Y5 >tmp.ps
### Step 3: plot coastlines and political boundaries
pscoast -R -JM -O -K -Dh -W4/155/0/255 -Na/1 \
-G200/200/0 -S10/200/220 >>tmp.ps
### Step 4: plot 1 red square in Kansas and another 1 in Nebraska
psxy -R -JM -O -K -Ss0.2 -G255/0/0  <<END>>tmp.ps
-100 39
-100 42
END
### Step 5: write the word Texas
pstext -R -JM -O -N <<END>>tmp.ps
-100 32 15 0 5 MC Texas
END
##################### End of useful codes. ##############################
#~~~~~~~~~~~~~~~~~~~~~~~~~~ Detailed Explanations ~~~~~~~~~~~~~~~~~~~~~~~
############################# Step 1:
# rm tmp.ps
# Your output will be tmp.ps. This step removes existing file
#        with the same name in the working directory.
# If you are asked "rm tmp.ps", answer "y".
############################# Step 2:
#psbasemap -R-120/-60/20/50 -JM5 -Ba30/a15 -P -K -X1.5 -Y5 >tmp.ps
### Important: the paramters (e.g. -R, -J, -P, -K, -X, -Y above)
#        of all GMT commands have no order, meaning that you can
#        put them wherever you want, as long as they are after
#        the GMT command (psbasemap in this case) and before
#        the ">" sign.
### psbasemap is a GMT command to make a basemap
### -R is a parameter of psbasemap, defining the region to be ploted.
#   The format for -R is W/E/S/N (i.e. west/east/south/north)
### -J is a parameter for psbasemap.
#        M after -J means you want to use Mecator projection which
#        is the most commonly used projection for mapping.
#        The "5" after -JM means you want the horizontal length of the final
#        map be 5 inches. The length along the vertical direction will
#        be determined by GMT.
### -B defines the frame (Boundary) of your plot. a30 means you want
#        an annotation every 30 degrees at the horizontal direction; and
#        /a15 means you want an annotation every 15 degrees at the vertical
#        direction.
### -P means you want to use Portrait mode instead of landscape mode.
#        If you want to use landscape mode, remove the -P.
### -K means that you will have more output below.
### -X1.5 means that you want your plot shifted by 1.5 inch to the right
#        from the lowerleft corner of the paper
### -Y5 means that you want your plot shifted up by 5 inches
#        from the lowerleft corner of the paper
### > is a 're-direction' sign. It means that you want the output
#        file be written to the file tmp.ps. Without ">", the
#        output will be on the screen (and rolling forever...)
### tmp.ps is your output graphic file (in Postscript format).
################################# Step 3:
#pscoast -R -JM -O -K -Dh -W4/155/0/255 -Na/1 \
#-G200/200/0 -S10/200/220 >>tmp.ps
### pscoast is another GMT command to plot coastlines and political
#        boundaries
### -R is a paramter for pscoast (all the other single characters preceded
#                by "-" are parameters for pscoast. Because you have already
#                given the geographic coordinates in the psbasemap above,
#                you don't have to give them following -R again.
### -JM is the same as in the psbasemap command above. Again, you don't have
#                to put a "5" after -JM because it was already given in the
#                psbasemap command
### -D is a parameter for you to choose which database of coastlines and
#        political boundaries to be used. -Dh means you want to use the
#        high resolution one. From low to high: -Dc (coarse), -Dl (low),
#        -Dh (high), -Df (full). For mapping large areas you may want to
#        use -Dl or -Dc.
### -O means you want the output (coastlines and political boundaries) created
#        by this pscoast command to be Overplotted on top of the output from
#        the commands above
### -K means you will have more output to be added to tmp.ps
### -W is for the thickness and the color of the pen to be used to plot
#        the coastlines (but not the political boundaries).
#        the first number following -W ("4" in this case) gives the thickness.
#        Normally a number between 1 and 5 looks normal. 10 will be pretty
#        thick and 0.1 will be very thin.
#        155/0/255 following  -W4/ gives the color of the pen. There are 3
#        colors (red/green/blue), each of them ranges from 0 to 255. Therefore
#        by using 155 for red, you want a middle-level participation of red;
#        by using 0 for green, you want no green color at all; and
#        by using 255 for blue, you want a full blue color. The combined color
#         of 155/0/255 is a K-State purple.
### -N is a parameter regarding national (and for North America, state as
#        well) boundaries. -Na means you want all the boundaries (national
#        and state). The "1" following -Na/ is the thickness of the pen
#        to plot national and state boundaries.
### \  means you want to continue the same command in a
#        new line. Remeber: don't leave a space after \
### -G is a paramter used to fill land areas with colors (or patterns).
#        Again, the 3 numbers following -G give the red/green/blue level
#        in the mixing.
### -S is similar to -G but is to fill the water bodies (lakes and oceans).
### >>tmp.ps means you want the output be written to tmp.ps. Note that
#        there are two ">"s.         
################################# Step 4:
#psxy -R -JM -O -K -Ss0.2 -G255/0/0  <<END>>tmp.ps
#-100 39
#-100 42
#END
### psxy is another very common GMT command to plot data with both x and
#        y values.
### -R is the same as the -R in pscoast or psbasemap
### -J is the same as the -J in pscoast or psbasemap
### -O and -K are the same as in pscoast or psbasemap
### -S asks you for what symbol you want to use. -Ss means you
#        want to plot a square; The number following -Ss gives
#        the size of the square (in inches). Therefore, -Ss0.2 means
#        you want a square of 0.2 inches in size.
### -G gives the color of the squares;
### <<END means that the following lines will be the input of psxy
#        until the word "END" is met.
### >> tmp.ps means you want to write the output file to tmp.ps
### -100 39  gives the longitude and latitude of the first square
### -100 42  gives the longitude and latitude of the 2nd square. You can
#        put a lot more squares
### END means your input for psxy ends here. Note: Don't leave a
#        space after END
################################# Step 5:
#pstext -R -JM -O -N <<END>>tmp.ps
#-100 32 15 0 5 MC Texas
#END
### pstext is another common GMT command to write texts.
### -R, -JM, -O, <<END>>tmp.ps have the same meaning as in psxy
# Note that you should not put a "-K" here because pstext will
#        be the last GMT command and no future graphic file to add.
#### There are 6 numbers for pstext.
# The first one (-100 in the example), gives the x-coordinate of
# the texts;
# The 2nd one (32), gives the y-coordinates of the plot.
# The 3rd one (15) gives the size of the texts (15 is normal).
# The 4th one (0) gives the angle of the texts (90 will be vertical)
# The 5th one (5) gives the font number (there are 22 or so fonts).
# The 6th one (MC) means you want the texts be plotted at the Mid-Center
#        of the location given by the first 2 numbers.
#### -N means you want the texts be plotted even if they are out of
#        the area given by -R.
1.jpg
回复

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:37:30
######### Example A2
### Step 1: Remove the exiting file named tmp.ps, if any. Don't
# be alarmed by the warning message "tmp.ps: No such file or directory"   
/bin/rm tmp.ps
### Step 2: make a basemap
psbasemap -R-120/-60/20/50 -JM5 -Ba30/a15 -P -K -X1.5 -Y5 >tmp.ps
### Step 3: plot coastlines and political boundaries
pscoast -R -JM -O -K -Dh -W4/155/0/255 -Na/1 \
-G200/200/0 -S10/200/220 >>tmp.ps
### Step 4: plot 1 red square in Kansas and another 1 in Nebraska
psxy -R -JM -O -K -Ss0.2 -G255/0/0  <<END>>tmp.ps
-100 39
-100 42
END
### Step 5: write the word Texas
pstext -R -JM -O -K -N <<END>>tmp.ps
-100 32 15 0 5 MC Texas
END
### Step 6: add a thick green great-circle arc line connecting two points
psxy -R -JM -O -K -W15/0/255/0  <<END>>tmp.ps
-110 45
-80 40
END
### Step 7: plot a blue rectangle (e.g., my area of study)
psxy -R -JM -O -W9/0/0/255  <<END>>tmp.ps
-108 40
-108 38
-103 38
-103 40
-108 40
END
##################### End of useful codes. ##############################
#~~~~~~~~~~~~~~~~~~~~~~~~~~ Detailed Explanations ~~~~~~~~~~~~~~~~~~~~~~~
############################# Step 1:
# rm tmp.ps
# Your output will be tmp.ps. This step removes existing file
#        with the same name in the working directory.
# If you are asked "rm tmp.ps", answer "y".
############################# Step 2:
#psbasemap -R-120/-60/20/50 -JM5 -Ba30/a15 -P -K -X1.5 -Y5 >tmp.ps
### Important: the paramters (e.g. -R, -J, -P, -K, -X, -Y above)
#        of all GMT commands have no order, meaning that you can
#        put them wherever you want, as long as they are after
#        the GMT command (psbasemap in this case) and before
#        the ">" sign.
### psbasemap is a GMT command to make a basemap
### -R is a parameter of psbasemap, defining the region to be ploted.
#   The format for -R is E/W/S/N (i.e. east/west/south/north)
### -J is a parameter for psbasemap.
#        M after -J means you want to use Mecator projection which
#        is the most commonly used projection for mapping.
#        The "5" after -JM means you want the horizontal length of the final
#        map be 5 inches. The length along the vertical direction will
#        be determined by GMT.
### -B defines the frame (Boundary) of your plot. a30 means you want
#        an annotation every 30 degrees at the horizontal direction; and
#        /a15 means you want an annotation every 15 degrees at the vertical
#        direction.
### -P means you want to use Portrait mode instead of landscape mode.
#        If you want to use landscape mode, remove the -P.
### -K means that you will have more output below.
### -X1.5 means that you want your plot shifted by 1.5 inch to the right
#        from the lowerleft corner of the paper
### -Y5 means that you want your plot shifted up by 5 inches
#        from the lowerleft corner of the paper
### > is a 're-direction' sign. It means that you want the output
#        file be written to the file tmp.ps. Without ">", the
#        output will be on the screen (and rolling forever...)
### tmp.ps is your output graphic file (in Postscript format).
################################# Step 3:
#pscoast -R -JM -O -K -Dh -W4/155/0/255 -Na/1 \
#-G200/200/0 -S10/200/220 >>tmp.ps
### pscoast is another GMT command to plot coastlines and political
#        boundaries
### -R is a paramter for pscoast (all the other single characters preceded
#                by "-" are parameters for pscoast. Because you have already
#                given the geographic coordinates in the psbasemap above,
#                you don't have to give them following -R again.
### -JM is the same as in the psbasemap command above. Again, you don't have
#                to put a "5" after -JM because it was already given in the
#                psbasemap command
### -D is a parameter for you to choose which database of coastlines and
#        political boundaries to be used. -Dh means you want to use the
#        high resolution one. From low to high: -Dc (coarse), -Dl (low),
#        -Dh (high), -Df (full). For mapping large areas you may want to
#        use -Dl or -Dc.
### -O means you want the output (coastlines and political boundaries) created
#        by this pscoast command to be Overplotted on top of the output from
#        the commands above
### -K means you will have more output to be added to tmp.ps
### -W is for the thickness and the color of the pen to be used to plot
#        the coastlines (but not the political boundaries).
#        the first number following -W ("4" in this case) gives the thickness.
#        Normally a number between 1 and 5 looks normal. 10 will be pretty
#        thick and 0.1 will be very thin.
#        155/0/255 following  -W4/ gives the color of the pen. There are 3
#        colors (red/green/blue), each of them ranges from 0 to 255. Therefore
#        by using 155 for red, you want a middle-level participation of red;
#        by using 0 for green, you want no green color at all; and
#        by using 255 for blue, you want a full blue color. The combined color
#         of 155/0/255 is a K-State purple.
### -N is a parameter regarding national (and for North America, state as
#        well) boundaries. -Na means you want all the boundaries (national
#        and state). The "1" following -Na/ is the thickness of the pen
#        to plot national and state boundaries.
### \  means you want to continue the same command in a
#        new line. Remeber: don't leave a space after \
### -G is a paramter used to fill land areas with colors (or patterns).
#        Again, the 3 numbers following -G give the red/green/blue level
#        in the mixing.
### -S is similar to -G but is to fill the water bodies (lakes and oceans).
### >>tmp.ps means you want the output be written to tmp.ps. Note that
#        there are two ">"s.         
################################# Step 4:
#psxy -R -JM -O -K -Ss0.2 -G255/0/0  <<END>>tmp.ps
#-100 39
#-100 42
#END
### psxy is another very common GMT command to plot data with both x and
#        y values.
### -R is the same as the -R in pscoast or psbasemap
### -J is the same as the -J in pscoast or psbasemap
### -O and -K are the same as in pscoast or psbasemap
### -S asks you for what symbol you want to use. -Ss means you
#        want to plot a square; The number following -Ss gives
#        the size of the square (in inches). Therefore, -Ss0.2 means
#        you want a square of 0.2 inches in size.
### -G gives the color of the squares;
### <<END means that the following lines will be the input of psxy
#        until the word "END" is met.
### >> tmp.ps means you want to write the output file to tmp.ps
### -100 39  gives the longitude and latitude of the first square
### -100 42  gives the longitude and latitude of the 2nd square. You can
#        put a lot more squares
### END means your input for psxy ends here. Note: Don't leave a
#        space after END
################################# Step 5:
#pstext -R -JM -O -N <<END>>tmp.ps
#-100 32 15 0 5 MC Texas
#END
### pstext is another common GMT command to write texts.
### -R, -JM, -O, <<END>>tmp.ps have the same meaning as in psxy
# Note that you should not put a "-K" here because pstext will
#        be the last GMT command and no future graphic file to add.
#### There are 6 numbers for pstext.
# The first one (-100 in the example), gives the x-coordinate of
# the texts;
# The 2nd one (32), gives the y-coordinates of the plot.
# The 3rd one (15) gives the size of the texts (15 is normal).
# The 4th one (0) gives the angle of the texts (90 will be vertical)
# The 5th one (5) gives the font number (there are 22 or so fonts).
# The 6th one (MC) means you want the texts be plotted at the Mid-Center
#        of the location given by the first 2 numbers.
#### -N means you want the texts be plotted even if they are out of
#        the area given by -R.
#################################### Step 6:
#add a thick green great-circle arc line connecting two points
#psxy -R -JM -O -K -W15/0/255/0  <<END>>tmp.ps
#-110 45
#-80 40
#END
### -W is the paramter for pen, same as the -W in Step 3.
# One thing to remember is that in psxy, if you don't
#        define a symbol using the -S parameter, psxy will
#        plot a line connecting the points defined in the
#        input lines or the input file.
### -110 45 is the longitude and latitude of one end of the line
### -80 40 is the longitude and latitude of the other end of the line
####################################### Step 7
#plot a blue rectangle (e.g., my area of study)
#psxy -R -JM -O -W9/0/0/255  <<END>>tmp.ps
#-108 40
#-108 38
#-103 38
#-103 40
#-108 40
#END
### Almost everything is the same as in Step 6.
#        The only difference is that the line connects
#        five points and these points happen to form
#        a rectangle.
# Note: there is no -K in this step because it is the last
#        GMT command.
1.jpg
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:39:13
### Example A6:
## For detailed explanations, see previous examples or use
##        man gmt_command (e.g., pscoast)
##### Step 1: remove the file with the same name as the output file
/bin/rm tmp.ps
##### Step 2: plot the coastlines and political boundaries
pscoast -R-125/-70/30/50 -JM6 \
-W3 -A1000 -P -S150/250/200 -Ba10f5 -Dl -Na/1 -X1.5 -Y3 -K >tmp.ps
##### Step 3: Plot the red lines (great circle arcs)
awk '{print $1, $2}' mypath.data | \
psxy -R -M -W8/255/0/0 -JM -O -K >>tmp.ps
##### Step 4: Put blue circles at the ends
awk '{print $1, $2}' mypath.data | \
psxy -R -JM -O -K -Sc0.1 -G0/0/255 >>tmp.ps
##### Step 5: Write the texts in the 3rd column of mypath.data at the
#        location 1 degree above the circles
awk '{print $1, $2+1.0,"15 0 0 6",$3}' mypath.data | \
pstext -R -JM -O -K -G255/0/0 >>tmp.ps
###### Step 6: Write the texts in the 4th column 1 degree below the circles
awk '{print $1, $2-1.0,"14 0 0 6",$4}' mypath.data | \
pstext -R -JM -O -K -G150/0/250  >>tmp.ps
###### Step 7: Add titles etc.
pstext -R -N -JM -O <<END>>tmp.ps
-97.5 53 19 0 1 6 Steve Gao's Paths of Migration Since 1989
-97.5 51 15 0 5 6 Order: UCLA - CIW - ASU -KSU - MST
END
ps2jpeg150 tmp.ps


-118.0 34.0 UCLA 89.9-97.2
-78.0 39.0 CIW  97.2-98.8
-111.9 33.4 ASU  98.8-99.5
-96.5 39.0 KSU  99.8-06.7
-91.771 37.951 MST 06.08-pres
1.jpg
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:40:33
#!/bin/csh
/bin/rm tmp.ps              tmp.grd tmp.int tmp.cpt
set lon1 =   -120.00
set lon2 =    -20.00
set lat1 =    -60.00
set lat2 =      0.00
set a =      20.0
psbasemap -R$lon1/$lon2/$lat1/$lat2 -JM5 -Bf1a$a \
-V -P -K -X1.5 -Y2 >tmp.ps              
grdcut /home/sgao/Dbase/etopo5/etopo5.grd       \
-Gtmp.grd -R  -V
grdgradient tmp.grd -A0 -Gtmp.int -Nt -V
grd2cpt tmp.grd -Ctopo       -Z >tmp.cpt
grdimage tmp.grd -Itmp.int -Ctmp.cpt -R -JM -O -K -V >>tmp.ps              
pscoast -R -JM -Df -W2 -Na/1 -O -V -K >>tmp.ps              
/bin/rm tmp.grd tmp.int tmp.cpt
echo "Your output postscript file is called tmp.ps              "
########### The above were created by topoimag
## All you need to do is adding a "-K" in the
#pscoast line above, and adding the following line:
awk '{print $4, $3}' test1.dat | \
psxy -R -JM -O -Sc0.05 -G255/0/0 -W0.1 -L >>tmp.ps
ps2jpeg150 tmp.ps
1.jpg
test1.rar (73.74 KB, 下载次数: 0)
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:43:29
#!/bin/csh
/bin/rm tmp.ps
## The center of the map is lon = 5.52838, and lat = 22.79149 (Algeria)
#########Basemap
pscoast -R0/360/-90/90 -JE5.52838/22.79149/180/4 \
-P -A10000 -W0.5 -K -G250/250/0 -X2 -Y2 > tmp.ps
######### circles
psxy -R -J -O -K  -Sc -L -P -W2 -V <<END>> tmp.ps
5.52838 22.79149 1.0
5.52838 22.79149 2.0
5.52838 22.79149 3.0
5.52838 22.79149 4.0
END
## Center (blue triangle)
psxy -R -J -St0.1 -G0/0/255 -K -O <<END>>tmp.ps
5.52838 22.79149
END
######### Add event locations #########################################
awk '{print $3, $4}' pie.dat | \
psxy -R -J -O -Sc0.04 -L -W6/255/0/0 -K >> tmp.ps
pstext -R-10/10/-10/10 -JX4 -O -N <<END>>tmp.ps
0 -2.5 13 0 5 6 45
0 -5   13 0 5 6 90
0 -7.5 13 0 5 6 135
0 -10  13 0 5 6 180
END
ps2jpeg150 tmp.ps
pie.rar (12.92 KB, 下载次数: 0)
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:46:50
#!/bin/csh
/bin/rm tmp.ps  tmp.cpt
set lon1 =      5.4
set lon2 =      5.7
set lat1 =      22.65
set lat2 =      22.9
psbasemap -R$lon1/$lon2/$lat1/$lat2 -JM5 -Ba0.05g0.05f0.05 \
-V -P -K -X1.5 -Y2 >tmp.ps
grdcut /home/sgao/Dbase/gtopo30/north.grd  \
-Gtmp1.grd -R  -V
grdsample tmp1.grd -Gtmp.grd -I0.002
grdgradient tmp.grd -A0 -Gtmp.int -N -V
#grd2cpt tmp.grd -Csealand  -Z >tmp.cpt
makecpt -Cpanoply -T1200/1800/100 -Z >tmp.cpt
grdimage tmp.grd -Itmp.int -Ctmp.cpt -R -J -O -K >>tmp.ps
grdcontour tmp.grd -T+ -J -R -C50 -A50 -W2 -O -K >>tmp.ps
grdcontour tmp.grd -T- -J -R -C100 -A100 -W2 -O -K >>tmp.ps
psscale -D2.5/-0.4/5/0.2h -Ctmp.cpt -O -K >>tmp.ps
pstext -R -J -N -O -K <<END>>tmp.ps
5.55 22.59 14 0 5 6 Elevation (m)
END
### Draw circles
awk '{print $2, $1}' circ1.out | \
psxy  -R -J -W8/255 -O -K >>tmp.ps
awk '{print $2, $1}' circ2.out | \
psxy  -R -J -W8/255 -O -K >>tmp.ps
awk '{print $2, $1}' circ3.out | \
psxy  -R -J -W8/255 -O -K >>tmp.ps
##--------------
pscoast -R -J -Df -Lf5.675/22.675/22.7/4 -W2 -Na/1 -O -K >>tmp.ps
psxy pie.dat -R -J -Sx0.1 -W5/255/0/0 -O -K >>tmp.ps
psxy -R -J -B -O -St0.2 -G0/255/0 <<END>>tmp.ps
    5.5270    22.7910
END
ps2jpeg150 tmp.ps
pie (1).rar (13.71 KB, 下载次数: 3)
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:48:20
#!/bin/csh
/bin/rm tmp.ps              
/bin/rm tmp.cpt
set lon1 =   -127.00
set lon2 =    -60.00
set lat1 =     25.00
set lat2 =     50.00
psbasemap -R$lon1/$lon2/$lat1/$lat2 -JM7 -Ba5f1g5 \
-V  -K -X0.5 -P -Y2 >tmp.ps              
grdcut /home/sgao/Dbase/topo2min/topo2min.grd   \
-Gtmp.grd -R  -V
grdgradient tmp.grd -A0 -Gtmp.int -Nt -V
grd2cpt tmp.grd -Csealand    -Z >tmp.cpt
grdimage tmp.grd -Itmp.int -Ctmp.cpt -R -JM -O -K >>tmp.ps              
pscoast -R -JM -B -S255 -Df -A100 -W12/255/0/0 -Na/12/255/0/0 -O -V >>tmp.ps              
1.jpg
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:55:31
/bin/rm tmp.ps
awk '{if($4 >4 && $5 <70) print $1, $2, 0.10*($4-3.8)}' cat_raw.out | \
psxy -R1960.88/2011.00/-45.0/-25.0 -JX6/8 -Sc -W3/255/0/0 \
-K -X1 -Y1.1 -P -Ba5f1/a1f0.5 >tmp.ps
awk '{if($4 >=7.0 && $5 < 70) print $1, $2, 0.10*($4-3.8)}' cat_raw.out | \
psxy -R -J -St -W9/0/0/255 -O -K >>tmp.ps
psxy -R -J -W50/255/0/0 -O -K <<END>>tmp.ps
1963 -37.5
1963 -45
END
pstext -R -J -N -O -U <<END>>tmp.ps
1987 -46.0 16 0 5 6 Time (year)
1955 -35 16 90 5 6 Latitude
1987 -24  14 0 0 6 Focal Latitude versus time plot of South American Magnitude > 4 quakes, depth <70 km
END
wwwview tmp.ps

cat_raw.rar (546.86 KB, 下载次数: 0)
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 16:59:44
#!/bin/csh
/bin/rm tmp.ps              
/bin/rm tmp.cpt
set lon1 =   -180.00
set lon2 =    180.00
set lat1 =    -80.00
set lat2 =     80.00
set a =      30.0
psbasemap -R$lon1/$lon2/$lat1/$lat2 -JM5 -Ba30f10 \
-V -P -K -X1.5 -Y2 >tmp.ps              
grdcut /home/sgao/Dbase/topo30min/data.grd       \
-Gtmp.grd -R  -V
grdgradient tmp.grd -A0 -Gtmp.int -Nt -V
makecpt -Cgray -T-10000/0/1000 -Z >tmp.cpt
grdimage tmp.grd -Itmp.int -Ctmp.cpt -R -JM -O -K >>tmp.ps              
pscoast -R -JM -Dh -W2 -A1000 -N1/1 -O -K >>tmp.ps              
awk '{print $1, $2}' routes.dat | \
psxy -R -M -W8/255/0/0 -JM -O -K >>tmp.ps
awk '{print $1, $2}' locs.dat | \
psxy -R -JM -O -K -Sc0.1 -G0/0/255 >>tmp.ps
pstext -R -N -JM -O <<END>>tmp.ps
0 85 19 0 0 6 Steve Gao's Work-related Trips Since 1999
END
1.jpg

date.rar (988 Bytes, 下载次数: 0)
回复 支持 反对

使用道具 举报

匿名
匿名  发表于 2013-4-20 17:03:27
#!/bin/csh
/bin/rm tmp.ps
psbasemap -R-180/180/-80/80 -JM5 -Ba60f30 \
-V -P -K -X1.5 -Y2 >tmp.ps              
pscoast -R -J -Dh -A1000 -W2 -Slightblue -Gyellow -N1/1 -O -V -K >>tmp.ps              
awk '{print $4, $3, 0.12*($6-7.0)}' big.quakes | \
psxy -R -J -O -Sc -W10/255/0/0 -L >>tmp.ps
ps2jpeg150 tmp.ps
big.rar (819 Bytes, 下载次数: 0)
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|物探论坛 ( 鄂ICP备12002012号 微信号:iwutan )

GMT+8, 2024-4-29 03:11 , Processed in 0.079868 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表