psclip − To set up polygonal clip paths |
psclip xyfiles −Jparameters −Rwest/east/south/north[r] [ −B[p|s]parameters ] [ −Eazim/elev ] [ −K ] [ −N ] [ −M[flag] ] [ −O ] [ −P ] [ −U[/dx/dy/][label] ] [ −V ] [ −X[a|c|r][x-shift[u]] ] [ −Y[a|c|r][y-shift[u]] ] [ −Zzlevel ] [ −ccopies] [ −:[i|o] ] [ −bi[s|S|d|D][ncol] ] [ −fcolinfo ] psclip −C [ −K ] [ −O ] |
psclip reads (x,y) file(s) [or standard input] and draws polygons that are activated as clipping paths. Several files may be read to create complex paths consisting of several non-connecting segments. As an option (−N), the user may choose to reverse the sense of what is the inside and outside of the paths. After subsequent plotting, which will be clipped against these paths, the clipping may be deactivated by running psclip a second time with the −C option only. |
xyfiles |
ASCII [or binary, see −b] file(s) with (x,y) values for clip polygons. If no files are given, the standard input is read. |
−C |
Mark end of existing clip path. No input file or projection information are needed. |
||
−J |
Selects the map projection. Scale is UNIT/degree, 1:xxxxx, or width in UNIT (upper case modifier). UNIT is cm, inch, or m, depending on the MEASURE_UNIT setting in .gmtdefaults4, but this can be overridden on the command line by appending c, i, or m to the scale/width value. For map height, max dimension, or min dimension, append h, +, or - to the width, respectively. |
More details can be found in the psbasemap man pages. CYLINDRICAL PROJECTIONS: −Jclon0/lat0/scale (Cassini) AZIMUTHAL PROJECTIONS: −Jalon0/lat0/scale (Lambert) CONIC PROJECTIONS: −Jblon0/lat0/lat1/lat2/scale
(Albers) MISCELLANEOUS PROJECTIONS: −Jhlon0/scale (Hammer) NON-GEOGRAPHICAL PROJECTIONS: −Jp[a]scale[/origin][r|z]
(Polar coordinates (theta,r)) |
−R |
xmin, xmax, ymin, and ymax specify the Region of interest. For geographic regions, these limits correspond to west, east, south, and north and you may specify them in decimal degrees or in [+-]dd:mm[:ss.xxx][W|E|S|N] format. Append r if lower left and upper right map coordinates are given instead of wesn. The two shorthands −Rg −Rd stand for global domain (0/360 or -180/+180 in longitude respectively, with -90/+90 in latitude). For calendar time coordinates you may either give relative time (relative to the selected TIME_EPOCH and in the selected TIME_UNIT; append t to −JX|x), or absolute time of the form [date]T[clock] (append T to −JX|x). At least one of date and clock must be present; the T is always required. The date string must be of the form [-]yyyy[-mm[-dd]] (Gregorian calendar) or yyyy[-Www[-d]] (ISO week calendar), while the clock string must be of the form hh:mm:ss[.xxx]. The use of delimiters and their type and positions must be as indicated (however, input/output and plotting formats are flexible). |
No space between the option flag and the associated arguments. |
−B |
Sets map boundary annotation and tickmark intervals; see the psbasemap man page for all the details. |
||
−E |
Sets the viewpoint’s azimuth and elevation [180/90]. |
||
−H |
Input file(s) has Header record(s). Number of header records can be changed by editing your .gmtdefaults4 file. If used, GMT default is 1 header record. Use −Hi if only input data should have header records [Default will write out header records if the input data have them]. |
||
−K |
More PostScript code will be appended later [Default terminates the plot system]. |
||
−M |
Multiple segment file. Segments are separated by a record whose first character is <flag>. [Default is ’>’]. |
||
−N |
Invert the sense of what is inside and outside, i.e., use the outside of the polygons for clipping. |
||
−O |
Selects Overlay plot mode [Default initializes a new plot system]. |
||
−P |
Selects Portrait plotting mode [GMT Default is Landscape, see gmtdefaults to change this]. |
||
−U |
Draw Unix System time stamp on plot. User may specify where the lower left corner of the stamp should fall on the page relative to lower left corner of plot. Optionally, append a label, or c (which will plot the command string.). The GMT parameters UNIX_TIME and UNIX_TIME_POS can affect the appearance; see the gmtdefaults man page for details. |
||
−V |
Selects verbose mode, which will send progress reports to stderr [Default runs "silently"]. |
||
−X −Y |
Shift origin of plot by (x-shift,y-shift), and opetionally append units (c, i, m, p). Prepend a for absolute coordinates; the default (r) will reset plot origin. Give c to center plot using current page size. |
||
−Z |
For 3-D projections: Sets the z-level of the polygons [0]. |
||
−: |
Toggles between (longitude,latitude) and (latitude,longitude) input and/or output. [Default is (longitude,latitude)]. Append i to select input only or o to select output only. [Default affects both]. |
||
−c |
Specifies the number of plot copies. [Default is 1]. |
||
−bi |
Selects binary input. Append s for single precision [Default is d (double)]. Uppercase S (or D) will force byte-swapping. Optionally, append ncol, the number of columns in your binary file if it exceeds the columns needed by the program. [Default is 2 input columns]. |
||
−f |
Special formatting of input and output columns (time or geographical data). Specify i(nput) or o(utput) [Default is both input and output]. Give one or more columns (or column ranges) separated by commas. Append T (Absolute calendar time), t (time relative to chosen TIME_EPOCH), x (longitude), y (latitude), or f (floating point) to each column or column range item. Shorthand −f[i|o]g means −f[i|o]0x,1y (geographic coordinates). |
To make an overlay PostScript file that will set up a complex clip area to which subsequent plotting will be confined, run: psclip my_region.xy −R0/40/0/40 −Jm0.3i −O −K > clip_mask_on.ps To deactivate the clipping in an existing plotfile, run: psclip −C −O >> complex_plot.ps |
psclip cannot handle polygons that contain the south or north pole. For such polygons, you should split them into two and make each explicitly contain the polar point. The two clip polygons will combine to give the desired effect. |