登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
看到有帖子在提问grads2.1的出图命令gxprint用法,刚刚从网上找了个英文版的介绍,简单翻译了一下,又装了个grads2.1来测试ok,给大家分享一下:
gxprint Beginning with GrADS version2.1, the gxprint commandwill produce all hardcopy output in both image and vector graphic formats. Theoutput is based on the current contents of the metabuffer, and it works inbatch mode as well as interactive mode. It replaces the print, gxps, gxeps, and printim commands. Syntax gxprint filename options --------------用法 where: filename: The name of the outputfile. If this file exists, it will be replaced.
If thefilename ends with ".eps", ".ps", ".pdf",".svg", ".png", ".gif", or ".jpg",then GrADS will automatically create the output in the correspondingformat. options:
eps ----------- Produceoutput in EPS format
ps ----------- Produce output in PSformat
pdf ----------- Produce output in PDFformat
svg ----------- Produceoutput in SVG format
png ----------- Produceimage output in PNG format
gif ----------- Produce image output inGIF format (not available with Cairo)
jpg ----------- Produce image output in JPGformat (not available with Cairo)
black ----------- Useblack background (default is current display setting)
white ----------- Usewhite background (default is current display setting)
xNN ----------- Horizontal image sizein NN pixels (for image output only)
yNN ----------- Vertical image sizein NN pixels (for image output only)
-e NN ----------- Theblank edge around the plot will be NN inches wide (for PS, EPS, andPDF output only)
-t NN ----------- Colornumber NN is fully transparent
-b bgImage ----------- Imagefile bgImage is included in the background of the output
-f fgImage ----------- Imagefile fgImage is included in the foreground of the output One or more options may be givenin any order. 大概就是如果文件名后缀是以上几种“pdf,jpg,png……”,系统会自动识别 参数balck表示黑底,white表示白底,跟以前一样 xNN yNN表示最终的图片像素 重点: -t NN 不确定,是指设置为NN颜色号的,该颜色可以透明,因为grads默认是黑底的(即0表示黑色),也就是说直接用-t 0可以得到背景透明的图片?我测试的结果就是这样,如果有错误还请懂的高手指正。 -b –f 分别是叠加背景和前景图片 以下是他们的英文例子: Usage Notes gxprint workswith GrADS version 2.1+. bgImage and fgImage must bePNG format, and the file names should not contain any upper case letters. The GIF and JPG image formats are notsupport by the Cairo library. These options will work only when using the GDlibrary for rendering image output. The default width of the edge around thePS, EPS, and PDF output files is 0.15625 inches. An edge width smaller than thedefault may result in the plot getting cropped by the printer. In GrADS version 2.1+, it is alsopossible to achieve color transparency (full or partial) using the set rgb command. Multi-page output is not yet supportedwith gxprint. Examples The following command produces a 1024x768PNG image into file test.png: gxprint test.png x1024 y768 This command produces a GIF image withtransparent color 0 and a background image mybkg.png. This means that intest.png, the background image mybkg.png will be seen wherever the color 0(background) appeared in the current display. gxprint test.png -b mybkg.png -t 0
|