登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 兰溪之水 于 2014-1-7 18:26 编辑
由于GrADS的计算函数比较少,有时为了省时间,用GrADS少了,不过GrADS画画图还是很不错的,所以偶尔心血来潮也会写写一些函数,今天给大家分享一个给图标号的函数,直接上用法吧~
*===============================================================
*
* "drawfigstr" function draws figure string.
*
* Usage: drawfigstr location figstring [factor]
* location - Location of the figure string:
* 'BottomLeft' or 'BL'
* 'BottomRight' or 'BR'
* 'TopLeft' or 'TL'
* 'TopRight' or 'TR'
* figstring - Figure string. eg: (a),(b),...
* factor - Factor of rectangle reference length, optional parameter
*
* Examples:
* 1. drawfigstr BottomLeft (a)
* 2. drawfigstr TL (b)
* 3. drawfigstr BR (c) 1.5
*
* Written by Lanxi, JUN 15, 2013.
*
*===============================================================
drawfigstr usage
测试程序:
- 'reinit''open model.ctl'
- *--------- figure 1 --------
- 'set vpage off'
- 'set parea 0.5 5 5 8'
- 'set grads off'
- 'set grid off'
- 'd ps'
- 'drawfigstr TopLeft (A)'
- *--------- figure 2 --------
- 'set vpage off'
- 'set parea 6.3 10.8 5 8'
- 'set grads off'
- 'set grid off'
- 'd ua'
- 'drawfigstr TR (b) 1.5'
- *--------- figure 3 --------
- 'set vpage off'
- 'set parea 0.5 5 1 4'
- 'set grads off'
- 'set grid off'
- 'd va'
- 'drawfigstr BL (c) 2'
- *--------- figure 4 --------
- 'set vpage off'
- 'set parea 6.3 10.8 1 4'
- 'set grads off'
- 'set grid off'
- 'd zg'
- 'drawfigstr BR (d)'
- 'printim test_drawfigstr.png white'
- ;
结果:
test_drawfigstr
函数:
drawfigstr.gs
(3.26 KB, 下载次数: 745)
|