.\" Man page generated from reStructuredText. . .TH "PSSCALE" "1gmt" "May 21, 2019" "5.4.5" "GMT" .SH NAME psscale \- Plot a gray or color scale-bar on maps . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBpsscale\fP \fB\-D\fP\fIrefpoint\fP [ \fB\-B\fP[\fBp\fP|\fBs\fP]\fIparameters\fP ] [ \fB\-C\fP\fIcpt\fP ] [ \fB\-F\fP\fIbox\fP ] [ \fB\-G\fP\fIzlo\fP/\fIzhi\fP ] [ \fB\-I\fP[\fImax_intens\fP|\fIlow_i\fP/\fIhigh_i\fP] ] [ \fB\-J\fP\fIparameters\fP ] [ \fB\-J\fP\fBz\fP|\fBZ\fP\fIparameters\fP ] [ \fB\-K\fP ] [ \fB\-L\fP[\fBi\fP][\fIgap\fP] ] [ \fB\-M\fP ] [ \fB\-N\fP[\fBp\fP|\fIdpi\fP ]] [ \fB\-O\fP ] [ \fB\-P\fP ] [ \fB\-Q\fP ] [ \fB\-R\fP\fIregion\fP ] [ \fB\-S\fP ] [ \fB\-U\fP[\fIstamp\fP] ] [ \fB\-V\fP[\fIlevel\fP] ] [ \fB\-W\fP\fIscale\fP ] [ \fB\-X\fP\fIx_offset\fP ] [ \fB\-Y\fP\fIy_offset\fP ] [ \fB\-Z\fP\fIzfile\fP ] [ \fB\-p\fPflags ] [ \fB\-t\fPtransp ] .sp \fBNote:\fP No space is allowed between the option flag and the associated arguments. .SH DESCRIPTION .sp \fBpsscale\fP plots gray scales or color scales on maps. Both horizontal and vertical scales are supported. For CPTs with gradational colors (i.e., the lower and upper boundary of an interval have different colors) \fBpsscale\fP will interpolate to give a continuous scale. Variations in intensity due to shading/illumination may be displayed by setting the option \fB\-I\fP\&. Colors may be spaced according to a linear scale, all be equal size, or by providing a file with individual tile widths. The font used for the annotations along the scale and optional units is specified by FONT_ANNOT_PRIMARY\&. If a label is requested, it is plotted with FONT_LABEL\&. .SH REQUIRED ARGUMENTS .INDENT 0.0 .TP \fB\-D\fP[\fBg\fP|\fBj\fP|\fBJ\fP|\fBn\fP|\fBx\fP]\fIrefpoint\fP[\fB+w\fP\fIlength\fP[/\fIwidth\fP]][\fB+e\fP[\fBb\fP|\fBf\fP][\fIlength\fP]][\fB+h\fP|\fBv\fP][\fB+j\fP\fIjustify\fP][\fB+m\fP[\fBa\fP|\fBc\fP|\fBl\fP|\fBu\fP]][\fB+n\fP[\fItxt\fP]][\fB+o\fP\fIdx\fP[/\fIdy\fP]] Defines the reference point on the map for the color scale using one of four coordinate systems: (1) Use \fB\-Dg\fP for map (user) coordinates, (2) use \fB\-Dj\fP or \fB\-DJ\fP for setting \fIrefpoint\fP via a 2\-char justification code that refers to the (invisible) map domain rectangle, (3) use \fB\-Dn\fP for normalized (0\-1) coordinates, or (4) use \fB\-Dx\fP for plot coordinates (inches, cm, etc.). All but \fB\-Dx\fP requires both \fB\-R\fP and \fB\-J\fP to be specified. For \fB\-Dj\fP or \fB\-DJ\fP with codes TC, BC, ML, MR (i.e., centered on one of the map sides) we pre\-calculate all further settings. Specifically, the \fIlength\fP is set to 80% of the map side, horizontal or vertical depends on the side, the offset is MAP_LABEL_OFFSET for \fBDj\fP with an extra offset MAP_FRAME_WIDTH for \fBDJ\fP, and annotations are placed on the side of the scale facing away from the map frame. However, you can override any of these with these modifiers: Append \fB+w\fP followed by the \fIlength\fP and \fIwidth\fP of the color bar. If \fIwidth\fP is not specified then it is set to 4% of the given \fIlength\fP\&. Give a negative \fIlength\fP to reverse the scale bar. Append \fB+h\fP to get a horizontal scale [Default is vertical (\fB+v\fP)]. By default, the anchor point on the scale is assumed to be the bottom left corner (BL), but this can be changed by appending \fB+j\fP followed by a 2\-char justification code \fIjustify\fP (see pstext). Note: If \fB\-Dj\fP is used then \fIjustify\fP defaults to the same as \fIrefpoint\fP, if \fB\-DJ\fP is used then \fIjustify\fP defaults to the mirror opposite of \fIrefpoint\fP\&. Finally, add \fB+o\fP to offset the color scale by \fIdx\fP/\fIdy\fP away from the \fIrefpoint\fP point in the direction implied by \fIjustify\fP (or the direction implied by \fB\-Dj\fP or \fB\-DJ\fP). Add sidebar triangles for back\- and/or foreground colors with \fB+e\fP\&. Append \fBf\fP (foreground) or \fBb\fP (background) for only one sidebar triangle [Default gives both]. Optionally, append triangle height [Default is half the barwidth]. Move text to opposite side with \fB+m\fP[\fBa\fP|\fBc\fP|\fBl\fP|\fBu\fP]. Horizontal scale bars: Move annotations and labels above the scale bar [Default is below]; the unit remains on the left. Vertical scale bars: Move annotations and labels to the left of the scale bar [Default is to the right]; the unit remains below. Append one or more of \fBa\fP, \fBl\fP or \fBu\fP to control which of the annotations, label, and unit that will be moved to the opposite side. Append \fBc\fP if you want to print a vertical label as a column of characters (does not work with special characters). Append \fB+n\fP to plot a rectangle with the NaN color at the start of the bar, append \fItext\fP to change label from NaN. .UNINDENT .SH OPTIONAL ARGUMENTS .INDENT 0.0 .TP \fB\-B\fP[\fBp\fP|\fBs\fP]\fIparameters\fP Set annotation, tick, and gridline interval for the colorbar. The x\-axis label will plot beneath a horizontal bar (or vertically to the right of a vertical bar), except when using the \fB+m\fP modifier in the \fB\-D\fP option. As an option, use the y\-axis label to plot the data unit to the right of a horizontal bar (and above a vertical bar). When using \fB\-Ba\fP or \fB\-Baf\fP annotation and/or minor tick intervals are chosen automatically. If \fB\-B\fP is omitted, or no annotation intervals are provided, the default is to annotate every color level based on the numerical entries in the CPT (which may be overridden by ULB flags in the CPT). To specify custom text annotations for intervals, you must append ;\fIannotation\fP to each z\-slice in the CPT. .UNINDENT .INDENT 0.0 .TP \fB\-C\fP\fIcpt\fP \fIcpt\fP is the CPT to be used. By default all color changes are annotated. To use a subset, add an extra column to the CPT with a L, U, or B to annotate Lower, Upper, or Both color segment boundaries (but see \fB\-B\fP). If not given, \fBpsscale\fP will read stdin. Like grdview, \fBpsscale\fP can understand pattern specifications in the CPT. For CPTs where the \fIz\fP range is in meters, it may be useful to change to another unit when plotting. To do so, append \fB+U\fP\fIunit\fP to the file name. Likewise, if the CPT uses another unit than meter and you wish to plot the CPT versus meters, append \fB+u\fP\fIunit\fP\&. If a GMT master dynamic CPT is given instead then its \fIz\fP\-range will be set to its default range (if it has one) before plotting. .UNINDENT .INDENT 0.0 .TP \fB\-F\fP[\fB+c\fP\fIclearances\fP][\fB+g\fP\fIfill\fP][\fB+i\fP[[\fIgap\fP/]\fIpen\fP]][\fB+p\fP[\fIpen\fP]][\fB+r\fP[\fIradius\fP]][\fB+s\fP[[\fIdx\fP/\fIdy\fP/][\fIshade\fP]]] Without further options, draws a rectangular border around the scale using \fBMAP_FRAME_PEN\fP; specify a different pen with \fB+p\fP\fIpen\fP\&. Add \fB+g\fP\fIfill\fP to fill the scale box [no fill]. Append \fB+c\fP\fIclearance\fP where \fIclearance\fP is either \fIgap\fP, \fIxgap\fP/\fIygap\fP, or \fIlgap\fP/\fIrgap\fP/\fIbgap\fP/\fItgap\fP where these items are uniform, separate in x\- and y\-direction, or individual side spacings between scale and border. Append \fB+i\fP to draw a secondary, inner border as well. We use a uniform \fIgap\fP between borders of 2\fBp\fP and the \fBMAP_DEFAULTS_PEN\fP unless other values are specified. Append \fB+r\fP to draw rounded rectangular borders instead, with a 6\fBp\fP corner radius. You can override this radius by appending another value. Finally, append \fB+s\fP to draw an offset background shaded region. Here, \fIdx\fP/\fIdy\fP indicates the shift relative to the foreground frame [4\fBp\fP/\-4\fBp\fP] and \fIshade\fP sets the fill style to use for shading [gray50]. .UNINDENT .INDENT 0.0 .TP \fB\-G\fP\fIzlo\fP/\fIzhi\fP Truncate the incoming CPT so that the lowest and highest z\-levels are to \fIzlo\fP and \fIzhi\fP\&. If one of these equal NaN then we leave that end of the CPT alone. The truncation takes place before the plotting. .UNINDENT .INDENT 0.0 .TP \fB\-I\fP[\fImax_intens\fP|\fIlow_i\fP/\fIhigh_i\fP] Add illumination effects. Optionally, set the range of intensities from \- to + \fImax_intens\fP\&. If not specified, 1 is used. Alternatively, append \fIlow/high\fP intensities to specify an asymmetric range [Default is no illumination]. .UNINDENT .INDENT 0.0 .TP \fB\-J\fP\fIparameters\fP (more ...) Select map projection. .UNINDENT .INDENT 0.0 .TP \fB\-Jz\fP|\fBZ\fP\fIparameters\fP (more ...) Set z\-axis scaling; same syntax as \fB\-Jx\fP\&. .UNINDENT .INDENT 0.0 .TP \fB\-K\fP (more ...) Do not finalize the PostScript plot. .UNINDENT .INDENT 0.0 .TP \fB\-L\fP[\fBi\fP][\fIgap\fP] Gives equal\-sized color rectangles. Default scales rectangles according to the z\-range in the CPT (Also see \fB\-Z\fP). If set, any equal interval annotation set with \fB\-B\fP will be ignored. If \fIgap\fP is appended and the CPT is discrete we will center each annotation on each rectangle, using the lower boundary z\-value for the annotation. If \fBi\fP is prepended we annotate the interval range instead. If \fB\-I\fP is used then each rectangle will have its constant color modified by the specified intensity. .UNINDENT .INDENT 0.0 .TP \fB\-M\fP Force a monochrome graybar using the (television) YIQ transformation. .UNINDENT .INDENT 0.0 .TP \fB\-N\fP[\fBp\fP|\fIdpi\fP] Controls how the color scale is represented by the PostScript language. To preferentially draw color rectangles (e.g., for discrete colors), append \fBp\fP\&. Otherwise we will preferentially draw images (e.g., for continuous colors). Optionally append effective dots\-per\-inch for rasterization of color scales [600]. .UNINDENT .INDENT 0.0 .TP \fB\-O\fP (more ...) Append to existing PostScript plot. .UNINDENT .INDENT 0.0 .TP \fB\-P\fP (more ...) Select "Portrait" plot orientation. .UNINDENT .INDENT 0.0 .TP \fB\-Q\fP Select logarithmic scale and power of ten annotations. All z\-values in the CPT will be converted to p = log10(z) and only integer p values will be annotated using the 10^p format [Default is linear scale]. .UNINDENT .INDENT 0.0 .TP \fB\-R\fP\fIwest\fP/\fIeast\fP/\fIsouth\fP/\fInorth\fP[/\fIzmin\fP/\fIzmax\fP][\fB+r\fP][\fB+u\fP\fIunit\fP] \fIwest\fP, \fIeast\fP, \fIsouth\fP, and \fInorth\fP specify the region of interest, and you may specify them in decimal degrees or in [±]dd:mm[:ss.xxx][\fBW\fP|\fBE\fP|\fBS\fP|\fBN\fP] format Append \fB+r\fP if lower left and upper right map coordinates are given instead of w/e/s/n. The two shorthands \fB\-Rg\fP and \fB\-Rd\fP stand for global domain (0/360 and \-180/+180 in longitude respectively, with \-90/+90 in latitude). Alternatively for grid creation, give \fBR\fP\fIcode\fP\fIlon\fP/\fIlat\fP/\fInx\fP/\fIny\fP, where \fIcode\fP is a 2\-character combination of L, C, R (for left, center, or right) and T, M, B for top, middle, or bottom. e.g., BL for lower left. This indicates which point on a rectangular region the \fIlon\fP/\fIlat\fP coordinate refers to, and the grid dimensions \fInx\fP and \fIny\fP with grid spacings via \fB\-I\fP is used to create the corresponding region. Alternatively, specify the name of an existing grid file and the \fB\-R\fP settings (and grid spacing, if applicable) are copied from the grid. Appending \fB+u\fP\fIunit\fP expects projected (Cartesian) coordinates compatible with chosen \fB\-J\fP and we inversely project to determine actual rectangular geographic region. For perspective view (\fB\-p\fP), optionally append /\fIzmin\fP/\fIzmax\fP\&. In case of perspective view (\fB\-p\fP), a z\-range (\fIzmin\fP, \fIzmax\fP) can be appended to indicate the third dimension. This needs to be done only when using the \fB\-Jz\fP option, not when using only the \fB\-p\fP option. In the latter case a perspective view of the plane is plotted, with no third dimension. .UNINDENT .sp For perspective view \fBp\fP, optionally append /\fIzmin\fP/\fIzmax\fP\&. (more ...) .INDENT 0.0 .TP \fB\-S\fP Do not separate different color intervals with black grid lines. .UNINDENT .INDENT 0.0 .TP \fB\-U\fP[[\fIjust\fP]/\fIdx\fP/\fIdy\fP/][\fBc\fP|\fIlabel\fP] (more ...) Draw GMT time stamp logo on plot. .UNINDENT .INDENT 0.0 .TP \fB\-V\fP[\fIlevel\fP] (more ...) Select verbosity level [c]. .UNINDENT .INDENT 0.0 .TP \fB\-W\fP\fIscale\fP Multiply all \fIz\fP\-values in the CPT by the provided \fIscale\fP\&. By default the CPT is used as is. .UNINDENT .sp \fB\-X\fP[\fBa\fP|\fBc\fP|\fBf\fP|\fBr\fP][\fIx\-shift\fP[\fBu\fP]] .INDENT 0.0 .TP \fB\-Y\fP[\fBa\fP|\fBc\fP|\fBf\fP|\fBr\fP][\fIy\-shift\fP[\fBu\fP]] (more ...) Shift plot origin. .UNINDENT .INDENT 0.0 .TP \fB\-Z\fP\fIzfile\fP File with colorbar\-width per color entry. By default, width of entry is scaled to color range, i.e., z = 0\-100 gives twice the width as z = 100\-150 (Also see \fB\-L\fP). .UNINDENT .INDENT 0.0 .TP \fB\-p\fP[\fBx\fP|\fBy\fP|\fBz\fP]\fIazim\fP[/\fIelev\fP[/\fIzlevel\fP]][\fB+w\fP\fIlon0\fP/\fIlat0\fP[/\fIz0\fP]][\fB+v\fP\fIx0\fP/\fIy0\fP] (more ...) Select perspective view. (Required \fB\-R\fP and \fB\-J\fP for proper functioning). .UNINDENT .INDENT 0.0 .TP \fB\-t\fP[\fItransp\fP] (more ...) Set PDF transparency level in percent. .UNINDENT .INDENT 0.0 .TP \fB\-^\fP or just \fB\-\fP Print a short message about the syntax of the command, then exits (NOTE: on Windows just use \fB\-\fP). .TP \fB\-+\fP or just \fB+\fP Print an extensive usage (help) message, including the explanation of any module\-specific option (but not the GMT common options), then exits. .TP \fB\-?\fP or no arguments Print a complete usage (help) message, including the explanation of all options, then exits. .UNINDENT .SH EXAMPLES .sp To plot a a horizontal color scale (12 cm long; 0.5 cm wide) at the reference point (8,1) (paper coordinates) with justification at top center and automatic annotation interval, do .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt makecpt \-T\-200/1000/100 \-Crainbow > t.cpt gmt psscale \-Ct.cpt \-Dx8c/1c+w12c/0.5c+jTC+h \-Bxaf+l"topography" \-By+lkm > map.ps .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp To append a vertical color scale (7.5 cm long; 1.25 cm wide) to the right of a plot that is 6 inch wide and 4 inch high, using illumination, and show back\- and foreground colors, and annotating every 5 units, we provide the reference point and select the left\-mid anchor point via .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt psscale \-Dx6.5i+jLM/2i+w7.5c/1.25c+e \-O \-Ccolors.cpt \-I \-Bx5+lBATHYMETRY \-By+lm >> map.ps .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp To overlay a horizontal color scale (4 inches long and default width) above a Mercator map produced by a previous call, ensuring a 2 cm offset from the map frame, use .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gmt psscale \-DjCT+w4i+o0/2c+h \-O \-Ccolors.cpt \-Baf \-R \-J >> map.ps .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH NOTES .sp When the CPT is discrete and no illumination is specified, the color bar will be painted using polygons. For all other cases we must paint with an image. Some color printers may give slightly different colors for the two methods given identical RGB values. .SH SEE ALSO .sp gmt, makecpt gmtlogo, grd2cpt psimage, pslegend .SH COPYRIGHT 2019, P. Wessel, W. H. F. Smith, R. Scharroo, J. Luis, and F. Wobbe .\" Generated by docutils manpage writer. .