Home > atmlab > geoplots > gmt > grdimage.m

grdimage

PURPOSE ^

GRDIMAGE appends options to GMT grdimage

SYNOPSIS ^

function command = grdimage(file,in)

DESCRIPTION ^

 GRDIMAGE appends options to GMT grdimage

 purpose: Appends options to a short script and calls the GMT

 IN    file      %s              .ps-file created/appened to by command
       cptfile   %s              .cpt-file used for grdimage from makecpt.m

 OUT   command   %s              string command to be used in system call

 Created by Salomon Eliasson
 $Id: grdimage.m 7157 2011-09-18 10:38:57Z seliasson $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

grdimage.m

SOURCE CODE ^

0001 function command = grdimage(file,in)
0002 % GRDIMAGE appends options to GMT grdimage
0003 %
0004 % purpose: Appends options to a short script and calls the GMT
0005 %
0006 % IN    file      %s              .ps-file created/appened to by command
0007 %       cptfile   %s              .cpt-file used for grdimage from makecpt.m
0008 %
0009 % OUT   command   %s              string command to be used in system call
0010 %
0011 % Created by Salomon Eliasson
0012 % $Id: grdimage.m 7157 2011-09-18 10:38:57Z seliasson $
0013 
0014 grdimage = 'grdimage';
0015 
0016 %location of file, region and projection
0017 grdimage = sprintf('%s %s -R -J',grdimage,in.grdfile);
0018 
0019 %Use nearestneigbour interpolation, only use the nearest grid point
0020 %Otherwise the default bicubic interpolation introduces artifacts.
0021 grdimage = sprintf('%s -S-n/0',grdimage);
0022 
0023 grdimage = sprintf('%s %s',grdimage,in.plotPlacement);
0024 
0025 % selects Overlay plot mode and assuming more pscode will be appended
0026 grdimage = sprintf('%s -O -K',grdimage);
0027 
0028 %colortable
0029 grdimage = sprintf('%s -C%s',grdimage,in.plot.color.cptfile);
0030 
0031 command = sprintf('%s >> %s.ps',grdimage,file);

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005