gmt绘图例子3

分类: Unix基础 |
下面使用GMT绘制直方图。
------------------------------------------------------------------------------------------
#!/bin/sh
gmtset LABEL_FONT_SIZE 7.5p
gmtset ANNOT_FONT_SIZE_PRIMARY 7.5p
gmtset HEADER_FONT_SIZE 36p
gmtset PLOT_DEGREE_FORMAT dddF
ps1=Fig4d.ps
pshistogram Te.txt -Ba20f10/a4f2WSne -JX6c/4c -Z0 -G55 -R0/140/0/20 -W2 -F -P -L0.5p -V >$ps1
------------------------------------------------------------------------------------------
其中,pshistogram命令的作用是:Bin data and plot histograms
各参数的意义为:
-Z Choose between 6 types of histograms: 0 = counts [Default], 1 = frequency_percent, 2 = log (1.0 + count),
-G Select filling of bars [Default is no fill].如果为0~255的数,则为灰度图,0为黑色,255为白色,200的浅灰色比较不错。
-R xmin, xmax, ymin, and ymax specify the Region of interest.如果不选的话,则自动分配。
-W Sets the bin width used for histogram calculation
-F Center bin on each value. [Default is left edge].
-P Selects Portrait plotting mode [Default is Landscape],因此,如果添加-P,则x轴在水平方向,如果不添加,则x轴在垂直方向。
-L Draw bar outline using the specified pen thickness. [Default is no outline].
-V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
结果如下:
http://s13/mw690/62f3c4ef4dce39f58818c&690
------------------------------------------------------------------------------------------
#!/bin/sh
gmtset LABEL_FONT_SIZE 7.5p
gmtset ANNOT_FONT_SIZE_PRIMARY 7.5p
gmtset HEADER_FONT_SIZE 36p
gmtset PLOT_DEGREE_FORMAT dddF
ps1=Fig4d.ps
pshistogram Te.txt -Ba20f10/a4f2WSne -JX6c/4c -Z0 -G55 -R0/140/0/20 -W2 -F -P -L0.5p
------------------------------------------------------------------------------------------
其中,pshistogram命令的作用是:Bin data and plot histograms
各参数的意义为:
-Z Choose between 6 types of histograms: 0 = counts [Default], 1 = frequency_percent, 2 = log (1.0 + count),
-G Select filling of bars [Default is no fill].如果为0~255的数,则为灰度图,0为黑色,255为白色,200的浅灰色比较不错。
-R xmin, xmax, ymin, and ymax specify the Region of interest.如果不选的话,则自动分配。
-W Sets the bin width used for histogram calculation
-F Center bin on each value. [Default is left edge].
-P Selects Portrait plotting mode [Default is Landscape],因此,如果添加-P,则x轴在水平方向,如果不添加,则x轴在垂直方向。
-L Draw bar outline using the specified pen thickness. [Default is no outline].
-V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
结果如下:
http://s13/mw690/62f3c4ef4dce39f58818c&690