Package gmt :: Module gmt :: Class GMT
[show private | hide private]
[frames | no frames]

Class GMT


Generic Mapping Tools (GMT) plot class. Appearance of plot controlled by instance variables and keyword arguments to instance initializer. Instance variables that affect drawing of basemap, grid lines, axes and plot titles must be set prior to calling basemap class method. Instance variables that affect drawing and filling of contours, and drawing of labelbar must be set prior to calling contour class method. Instance variables that affect drawing of windbarbs must be set prior to calling windbarbs class method. Instance variables that are keyword arguments to __init__ are used by __init__, so resetting them later can have unpredictable effects (see the documentation for method setmapparms for an exception related to the use of native projection grids). Default value of instance variable is indicated to the left of the vertical bar, with a description on the right.
Method Summary
  __init__(self, template, nancolor, headerfontsize, labelfontsize, latmin, latmax, lonmin, lonmax, proj, longrdinc, latgrdinc, xsize, ysize, xyunits, xshift, yshift, centerlon, centerlat, lonframeinc, latframeinc, lonlabelinc, latlabelinc, axisfontsize, verbose, standardpar1, standardpar2, rectbounds, reverseyaxis, basemaptype)
create GMT class instance, set default values for instance variables and initialized postscript drawing area.
  basemap(self)
draw basemap, grid lines and titles.
  close(self, fixbb, addtrailer, psfilename, view)
close the postscript file, optionally add trailer, fix bounding box and render the plot.
  command(self, gmt_command_string, force_command)
Send a raw command to GMT core.
  contour(self, grdfile)
draw contours and optional labelbar.
  drawcurve(self, lats, lons, thickness, color)
draw a curve on the map from coordinates provided in lats, lons.
  drawline(self, latbegin, lonbegin, latend, lonend, thickness, color, greatcircle)
draw a line on the map from coordinates latbegin/lonbegin to latend/lonend.
  drawpolygon(self, lats, lons, linethickness, linecolor, fillcolor)
draw a closed polygon on the map from coordinates provided in lats, lons.
  drawsymbol(self, lat, lon, symbol, size, color)
draw a symbol on the map at coordinates lat/lon.
  drawtext(self, textstring, x, y, offset, fontsize, justify, angle, font, color, clip)
draw a text string on the map at coordinates x,y.
  latlontoxy(self, lat, lon)
convert lat/lon to x/y.
  setmapparms(self)
set up GMT map parameters for projection, grid lines etc.
  windbarbs(self, ugrd, vgrd)
draw wind barbs on map.
  wrtgrd(self, data, x, y, title, scale, offset, addcyclicpt, xunit, yunit, zunit, node_offset, zname)
write a Numeric array to a grd file suitable for GMT.
  xytolatlon(self, x, y)
convert x/y to lat/lon.

Instance Variable Summary
  alldashed: False | draw all contours dashed.
  axisfontsize: 16 | fontsize for axis name labels.
  barbangle: 120 | angle between wind barb and pillar.
  barblength: "0.2i" | wind barb pillar length (units appended).
  barbscale: 5 | magnitude corresponding to full wind barb.
  barbwidth: "0.1i" | wind barb length (note units are appended).
  boxfill: False | if true, draw grid-box filled image instead of filled contours.
  centerlat: 0 only used if proj in ['ortho','la','merc','gst'] or rectbounds: True, set to 0.5*(latmin+latmax) otherwise | latitude of projection center.
  centerlon: 0 only used if proj = "ortho" or rectbounds: True, set to 0.5*(lonmin+lonmax) otherwise | longitude of projection center.
  cint: None | contour interval (uses numlevs to chose if not set).
  clabels: True | draw contour labels.
  clipbarb: True | clip wind barbs at edge of map.
  coastlines: True | draw coastlines.
  coastres: 'c' | Resolution of coastline database to use ('c','l','m','h', or 'f').
  coastsmooth: 10000 | Coastline features with an area smaller than this number (in km^2) will not be plotted.
  coastthick: 2.0 | thickness to draw coastlines.
  colormap: "polar" | name of built-in GMT colormap for color-fill (run 'makecpt' without args to see choices) A filename for a custom cptfile can also be given (see GMT docs for information on cptfile format).
  continentfill: False | fill continents.
  continentfillcolor: 200 | grayscale color or rgb tuple to fill continents.
  continents: False | draw or fill continents and coastlines.
  contourcolor: (0,0,0) | color for contours (default black).
  contourfill: False | color-fill contours.
  countries: False | draw country boundaries (including states in North America).
  countrythick: 1.0 | thickness to draw states.
  cthick: 0.5 | contour line thickness
  drawclines: True | draw contour lines.
  eaxis: True | draw east (right) axis.
  elabels: False | draw labels on east (right) axis.
  headerfontsize: 18 | default fontsize for main, right and left titles.
  labelbar: True | draw a labelbar if contourfill or boxfill=True.
  labelbararrows: True | if true, draw arrows at labelbar ends
  labelbarheight: horizontal bar: yshift/6 OR vertical bar: xsize/25| height of labelbar (in xyunits) (in vertical case, height designate width...)
  labelbarinc: 2 | label lablelbar every labelbarinc levels.
  labelbarlength: horizontal bar: 0.9*xsize OR vertical bar: 0.9*ysize | length of labelbar (in xyunits)
  labelbarorient: 'h' | set labelbar orientation.
  labelbartitle: None | title for labelbar - size given by axisfontsize.
  labelbartitle_offset: 0.1 | offset for labelbar title (in xyunits)
  labelbarxpos: horizontal bar: 0.5*xsize OR vertical bar :xshift+1.05*xsize | x position of labelbar center (in xyunits)
  labelbarypos: horizontal bar: -yshift/3 OR vertical bar:ysize*0.5 | y position of labelbar top (in xyunits)
  labelfontsize: 12 | fontsize for axis value labels.
  labinc: 2 | label contours every labinc levels.
  latframeinc: 3 (if proj in ['loglinear','loglog']), otherwise latlabelinc if defined, latgrdinc if not | Increment for ticks on latitude axis.
  latgrdinc: getcint(latmin,latmax,6) | grid increment for latitude axis.
  latlabelinc: 2 (if proj in ['loglinear','loglog']), otherwise latframeinc if defined, latgrdinc if not | Increment for latitude axis labels.
  latmax: 90 | maximum latitude (or y axis value).
  latmin: -90 | minimum latitude (or y axis value).
  lefttitle: None | left title string.
  lefttitlefont: 0 | left title font (integer or string, run 'pstext -L' for options.
  lefttitlefontsize: headerfontsize | left title font size.
  lonframeinc: 3 (if proj in ['loglinear','loglog']), otherwise lonlabelinc if defined, longrdinc if not | Increment for ticks on longitude axis.
  longrdinc: getcint(latmin,latmax,6) | grid increment for longitude axis.
  lonlabelinc: 2 (if proj in ['loglinear','loglog']), otherwise lonframeinc if defined, longrdinc if not | Increment for longitude axis labels.
  lonmax: 360 | maximum longitude (or x axis value).
  lonmin: 0 | miniumum longitude (or x axis value).
  ltitleypos: chosen internally to be near upper left side of map | location of left title string.
  ltitleyshift: ysize/15 | vertical displacement of left title above map.
  maintitle: None | main title string.
  maintitlefont: 0 | main title font (integer or string, run 'pstext -L' for options.
  maintitlefontsize: headerfontsize | main title font size.
  mapscale: False | Draw a simple map scale.
  mapscalelatlon: False | specify position of map scale in lon/lat instead of x/y.
  mapscalelength: approx 1/5 zonal scale of plot | length of map scale in km.
  mapscalestyle: 'p' | 'p' for plain style, 'f' for fancy.
  mapscalexpos: xsize*4/5 | x-position of map scale.
  mapscaleypos: ysize/10 | y-position of map scale.
  maxlevel: default is min value of data | maximum contour level desired (if symmetriclevels=True, minlevel and maxlevel set to max(abs(minlevel),abs(maxlevel)).
  minlevel: default is min value of data | minimum contour level desired.
  missvalue: = 1.e20 ! data points greater than (less than if negative) this value are treating as missing and are set to NaN.
  mtitleypos: chosen internally to be near center of map, above right and left title | location of main title string
  mtitleyshift: ysize/7 | vertical displacement of main title above map.
  nancolor: (255,255,255) | color to fill NaN regions (default is white).
  naxis: True | draw north (top) axis.
  negcontourcolor: contourcolor | optional separate color for negative contours.
  negdashed: False | draw negative contours as dashed lines.
  nlabels: False | draw labels on north (top) axis.
  nozero: False | do not draw zero contour.
  numlevs: 15 | approx number of contour intervals desired (if cint not given, numlevs will be used to determine contour intervals).
  oceanfill: False | fill oceans.
  oceanfillcolor: 200 | grayscale color or rgb tuple to fill oceans.
  poscontourcolor: contourcolor | optional separate color for positive contours.
  posdashed: False | draw positive contours as dashed lines.
  proj: 'cyl' | map projection (valid choices 'linear','loglinear','loglog', 'cyl' - cylindrical equidistant, 'npst' - North Polar Stereographic, 'spst' - South Polar Stereographic, 'lc' - Lambert Conformal Conic, 'la' - lambert azimuthal, 'merc'- mercator, 'ortho' - Orthographic), and 'gst' - general stereographic.
  psview: "gs -q -dBATCH" | command for viewing postscript output (invoked when view=True in call to close method).
  rectbounds: False | if true latmin,lonmin is interpreted as lower left corner of rectangular map, latmax,lonmax upper right.
  reversecolormap: False | reverse the colors in the given colormap.
  reverseyaxis: False | reverse direction of y-axis for non-geographic map projections so that values decrease upwards (useful when depth or pressure is y-axis).
  righttitle: None | right title string.
  righttitlefont: 0 | right title font (integer or string, run 'pstext -L' for options.
  righttitlefontsize: headerfontsize | right title font size.
  rtitleypos: chosen internally to be near upper right side of map | location of right title string.
  rtitleyshift: ysize/15 | vertical displacement of right title above map.
  saxis: True | draw south (bottom) axis.
  skipbarbx: 1 | grid points to skip drawing wind barbs in longitudinal direction (1 means every wind barb is drawn).
  skipbarby: 1 | | grid points to skip drawing wind barbs in latitudinal direction (1 means every wind barb is drawn).
  slabels: False | draw labels on south (bottom) axis.
  stamp: None | Unix time stamp plotted with specified text.
  stampxpos: 0 | x position of Unix time stamp.
  stampypos: -yshift/5 | y position of Unix time stamp.
  standardpar1: lonmin + (1/6)*(lonmax-lonmin) | 1st standard parallel (only relevant if proj = 'lc').
  standardpar2: lonmin + (5/6)*(lonmax-lonmin) | 2nd standard parallel (only relevant if proj = 'lc').
  symmetriclevels: False | force contour levels to be symmetric about zero.
  uscastatesonly: False | draw only us and canada state boundaries.
  usstatesonly: False | draw only us state political boundaries.
  verbose: False | if true, print all GMT commands.
  waxis: True | draw west (left) axis.
  wlabels: False | draw labels on west (left) axis.
  xaxislabel: "" | x-axis label (only used for proj='loglinear', 'linear', and 'loglog'.
  xshift: 0 | offset plot in horizontal (units given by xyunits).
  xsize: 6.5 | width of plot (in units given by xyunits).
  xyunits: "i" | page measurement units (can be cm ('c'), inch ('i'), meter ('m'), or point ('p')).
  yaxislabel: "" | y-axis label (only used for proj='loglinear', 'linear', and 'loglog'.
  yshift: xsize/4 | offset plot in vertical (units given by xyunits) Set when class instance is created.
  ysize: 6.5 | height of plot (in units given by xyunits).
  zerocontourcolor: contourcolor | optional separate color for zero contour.
  zerothick: 1.5 | thickness of zero contour.

Method Details

__init__(self, template=None, nancolor=(255, 255, 255), headerfontsize=18, labelfontsize=12, latmin=-90, latmax=90, lonmin=0, lonmax=360, proj='cyl', longrdinc=None, latgrdinc=None, xsize=6.5, ysize=6.5, xyunits='i', xshift=0, yshift=0, centerlon=0, centerlat=0, lonframeinc=None, latframeinc=None, lonlabelinc=None, latlabelinc=None, axisfontsize=16, verbose=False, standardpar1=None, standardpar2=None, rectbounds=False, reverseyaxis=False, basemaptype='plain')
(Constructor)

create GMT class instance, set default values for instance variables and initialized postscript drawing area.
Keyword Parameters:
nancolor - (255,255,255) | color to fill NaN regions (default is white).
headerfontsize - 18 | default fontsize for main, right and left titles.
labelfontsize - 12 | fontsize for axis value labels.
axisfontsize - 16 | fontsize for axis name labels.
xsize - 6.5 | width of plot (in units given by xyunits).
ysize - 6.5 | height of plot (in units given by xyunits).
xyunits - "i" | page measurement units (can be cm ('c'), inch ('i'), meter ('m'), or point ('p')).
xshift - 0 | offset plot in horizontal (units given by xyunits)
yshift - xsize/4 | offset plot in vertical (units given byxyunits)
proj - 'cyl' | map projection (valid choices 'linear','loglinear', 'loglog','cyl' - cylindrical equidistant, 'npst' - North Polar Stereographic, 'spst' - South Polar Stereographic, 'lc' - Lambert Conformal Conic, 'la' - Lambert Azimuthal, 'merc'- Mercator, 'ortho' - Orthographic, 'gst' - general stereographic).
template - None | Previously defined class instance to use as a template. If a class instance is provided as a template, the other keyword arguments to __init__ are ignored.
latmin - -90 | minimum latitude (or y axis value).
latmax - 90 | maximum latitude (or y axis value).
lonmin - 0 | miniumum longitude (or x axis value).
lonmax - 360 | maximum longitude (or x axis value). Hint - to plot longitudes between 60 degrees west and 60 degrees east, use lonmin=300 and lonmax=420.
rectbounds - False | if true latmin,lonmin is interpreted as lower left corner of rectangular map, latmax,lonmax upper right.
longrdinc - getcint(latmin,latmax,6) | grid increment for longitude axis. Default is to choose approx. 6 "nice" levels. If < 0, no grid lines drawn for longitude axis.
latgrdinc - getcint(latmin,latmax,6) | grid increment for latitude axis. Default is to choose approx. 6 "nice" levels. If < 0, no grid lines drawn for latitude axis.
lonframeinc - 3 (if proj in ['loglinear','loglog']), longrdinc otherwise | Increment for ticks on longitude axis. For log axes, default value of 3 means ticks will be drawn for 1,2,3,4...,9.
latframeinc - 3 (if proj in ['loglinear','loglog']), latgrdinc otherwise | Increment for ticks on latitude axis. For log axes, default value of 3 means ticks will be drawn for 1,2,3,4...,9.
lonlabelinc - 2 (if proj in ['loglinear','loglog']), longrdinc otherwise | Increment for longitude axis labels. For log axes, default value of 2 means labels will be drawn for 1,2,5.
latlabelinc - 2 (if proj in ['loglinear','loglog']), latgrdinc otherwise | Increment for latitude axis labels. For log axes, default value of 2 means labels will be drawn for 1,2,5.
centerlon - 0 only used if proj = "ortho" or rectbounds: True, set to 0.5*(lonmin+lonmax) otherwise | longitude of projection center.
centerlat - 0 only used if proj in ['ortho','la','merc','gst'] or rectbounds: True, set to 0.5*(latmin+latmax) otherwise | latitude of projection center.
reverseyaxis - False | reverse direction of y-axis for non-geographic map projections so that values decrease upwards (useful when depth or pressure is y-axis).
verbose - False | if true, print all GMT commands.
standardpar1 - lonmin + (1/6)*(lonmax-lonmin) | 1st standard parallel (only relevant if proj = 'lc').
standardpar2 - lonmin + (5/6)*(lonmax-lonmin) | 2nd standard parallel (only relevant if proj = 'lc').
basemaptype - plain | basemap type ('plain' or 'fancy').

basemap(self)

draw basemap, grid lines and titles.

relevant instance variables: elabels,wlabels,nlabels,slabels,eaxis,waxis, naxis,saxis,coastres,coastsmooth,continents, continentfill,coastlines,continentfillcolor,usstatesonly uscastatesonly,maintitle,lefttitle,righttitle,mtitleyshift, maintitlefontsize,lefttitlefontsize,righttitlefontsize, maintitlefont,lefttitlefont,righttitlefont, ltitleyshift,rtitleyshift,rtitleypos,ltitleypos, mtitleypos,countries,countrythick,coastthick,oceanfill, mapscale,mapscalexpos,mapscaleypos,mapscalestyle,mapscalelength, mapscalelatlon,oceanfillcolor,stamp,stampxpos,stampypos

close(self, fixbb=True, addtrailer=True, psfilename=None, view=False)

close the postscript file, optionally add trailer, fix bounding box and render the plot. Cleanup temp files created by the class instance.
Keyword Parameters:
fixbb - True | Fixup bounding box.
addtrailer - True | Add trailer to postscript file.
psfilename - None | Save postscript to file, otherwise return the postscript in a StringIO instance.
view - False | render postscript using command specified by psview instance variable.
Returns:
postscript - If psfilename=None, returns StringIO instance containing postscript.

command(self, gmt_command_string, force_command=False)

Send a raw command to GMT core. By default, internal region and projection (option -R... or -J... ) will be automaticallly apppended to user command line. If region or projection is explicitly specified, an error is raised to be sure that region/projection is compatible with internal mapbounds. The usual -O and -K options are also appended automatically. To override these tests and force a region or region, use the "force_command=True" option in the command arguments. In that case, the strict raw command will be send to GMT and -O and -K option won't be appended.
Parameters:
gmt_command_string - raw GMT commandline string without -R and -J options
Keyword Parameters:
force_command - boolean used to override tests and apply exactly the raw command (default=False)

contour(self, grdfile)

draw contours and optional labelbar.

relevant instance variables: missvalue,clabels,numlevs,cint,minlevel,maxlevel, symmetriclevels,labinc,cthick,negdashed,posdashed, alldashed,zerothick,nozero,contourfill,contourcolor, negcontourcolor,poscontourcolor,zerocontourcolor,colormap, drawclines,reversecolormap,labelbar,labelbartitle, labelbartitle_offset,labelbarinc,labelbarxpos,labelbarorient, labelbarypos,labelbarlength,labelbarheight,boxfill, labelbararrows

drawcurve(self, lats, lons, thickness=2.0, color=(0, 0, 0))

draw a curve on the map from coordinates provided in lats, lons.
Parameters:
lats - list or rank 1 Numeric array of latitudes defining curve.
lons - list or rank 1 Numeric array of longitudes defining curve.
Keyword Parameters:
thickness - 2 | thicknes of curve (in points).
color - (0,0,0) | color of curve (rgb tuple).

drawline(self, latbegin, lonbegin, latend, lonend, thickness=2.0, color=(0, 0, 0), greatcircle=True)

draw a line on the map from coordinates latbegin/lonbegin to latend/lonend.
Parameters:
latbegin - latitude coordinate for beginning of line.
lonbegin - longitude coordinate for end of line.
latend - latitude coordinate for end of line.
lonend - longitude coordinate for end of line.
Keyword Parameters:
thickness - 2 | thicknes of line (in points).
color - (0,0,0) | color of line (rgb tuple).
greatcircle - True | draw line along great circle.

drawpolygon(self, lats, lons, linethickness=2.0, linecolor=(0, 0, 0), fillcolor=None)

draw a closed polygon on the map from coordinates provided in lats, lons.
Parameters:
lats - list or rank 1 Numeric array of latitudes defining polygon vertices.
lons - list or rank 1 Numeric array of longitudes defining polygon vertices.
Keyword Parameters:
linethickness - 2 | thicknes of line (in points) - no line if None.
linecolor - (0,0,0) | color of line (rgb tuple).
fillcolor - None | color to fill polygon (rgb tuple) - no fill if None.

drawsymbol(self, lat, lon, symbol='c', size=0.20000000000000001, color=(0, 0, 0))

draw a symbol on the map at coordinates lat/lon.
Parameters:
lat - latitude coordinate to draw symbol.
lon - longitude coordinate to draw symbol.
Keyword Parameters:
symbol - 'c' | symbol code (see psxy man page under -S for options).
size - 0.2 | size of symbol (in xyunits).
color - (0,0,0) | color of symbol (rgb tuple).

drawtext(self, textstring, x, y, offset=0, fontsize=14, justify='CM', angle=0, font=0, color=(0, 0, 0), clip=False)

draw a text string on the map at coordinates x,y.
Parameters:
textstring - text string to draw.
x - x coordinate to locate textstring (in xyunits).
y - y coordinate to locate textstring (in xyunits).
Keyword Parameters:
offset - 0 | offset textstring from (x,y) by this amount (in xyunits).
fontsize - 14 | font size (points).
justify - 'CM' | text is justified using this two-letter string, which can be a combination of L, C, R (for left, center, or right) and T, M, B (for top, middle, or bottom).
angle - 0 | draw textstring at a angle (degrees).
font - 0 | draw texstring with this font. If font is not an integer, it is taken to be a text string containing the font name (run 'pstext -L' for a list of font names and numbers)

latlontoxy(self, lat, lon)

convert lat/lon to x/y.
Parameters:
lat - latitude coordinate.
lon - longitude coordinate.
Returns:
x,y - x and y (in xyunits) of desired point.

setmapparms(self)

set up GMT map parameters for projection, grid lines etc. Called by __init__, but may be called again to reset. This is useful if you are plotting data on a native projection grid (initialize the class instance with proj='linear', draw the contours, reset the basemap instance variables for the desired projection then call the setmapparms prior to calling the basemap method).

relevant instance variables: proj,longrdinc,latgrdinc,lonframeinc, latframeinc,latlabelinc,lonlabelinc,centerlat,centerlon, standardpar1,standardpar1,rectbounds,xyunits,xshift,yshift, reverseyaxis

windbarbs(self, ugrd, vgrd)

draw wind barbs on map.

relevant instance variables: missvalue,skipbarbx,skipbarby,barbwidth,barblength, barbangle,barbscale,clipbarb

wrtgrd(self, data, x, y, title='', scale=1.0, offset=0, addcyclicpt=False, xunit='degrees longitude', yunit='degrees latitude', zunit='', node_offset=0, zname='')

write a Numeric array to a grd file suitable for GMT. returns a dictionary with grdfile metadata.
Parameters:
data - rank 2 Numeric Float array defining an evenly space grid of values to plot. Should have shape (nlats,nlons), i.e. first dimension should be latitudes, second should be longitudes. If data has shape (lons,lats) a transpose if performed before writing to grd file.
x - rank 1 Numeric Float array containing longitudes of grid. Should be in increasing order, if not data is reversed along x-axis before writing to grd file.
y - rank 1 Numeric Float array containing latitudes of grid. Should be in decreasing order, if not data is reversed along y-axis before writing to grd file.
Keyword Parameters:
title - "" | title describing dataset.
scale - 1 | factor to multiply data.
offset - 0 | offset to add to data values.
addcyclicpt - False | Add an extra "wraparound" longitude of data, identical to the first longitude (using the addcyclicpt function).
xunit - "degrees longitude" | units of x.
yunit - "degrees latitude" | units of y.
zunit - "" | units of data.
node_offset - 0 | 0 for grid-line registration (data points represent grid line intersections), 1 for pixel registration (data points represent average in grid cell).
zname - "" | data long_name.
Returns:
grdfile - dictionary containing grd file metadata.

xytolatlon(self, x, y)

convert x/y to lat/lon.
Parameters:
x - x coordinate (in xyunits).
y - y coordinate (in xyunits).
Returns:
lat,lon - latitude and longitude of desired point.

Instance Variable Details

alldashed

False | draw all contours dashed.

axisfontsize

16 | fontsize for axis name labels. Set when class instance is created. Modifying later has no affect.

barbangle

120 | angle between wind barb and pillar.

barblength

"0.2i" | wind barb pillar length (units appended).

barbscale

5 | magnitude corresponding to full wind barb.

barbwidth

"0.1i" | wind barb length (note units are appended).

boxfill

False | if true, draw grid-box filled image instead of filled contours. Takes precedence over contourfill, if both are True.

centerlat

0 only used if proj in ['ortho','la','merc','gst'] or rectbounds: True, set to 0.5*(latmin+latmax) otherwise | latitude of projection center. Set when class instance is created. If modified, setmapparms method must be called again.

centerlon

0 only used if proj = "ortho" or rectbounds: True, set to 0.5*(lonmin+lonmax) otherwise | longitude of projection center. Set when class instance is created. If modified, setmapparms method must be called again.

cint

None | contour interval (uses numlevs to chose if not set).

clabels

True | draw contour labels.

clipbarb

True | clip wind barbs at edge of map.

coastlines

True | draw coastlines.

coastres

'c' | Resolution of coastline database to use ('c','l','m','h', or 'f'). See 'Database Information' in pscoast man page for details.

coastsmooth

10000 | Coastline features with an area smaller than this number (in km^2) will not be plotted.

coastthick

2.0 | thickness to draw coastlines.

colormap

"polar" | name of built-in GMT colormap for color-fill (run 'makecpt' without args to see choices) A filename for a custom cptfile can also be given (see GMT docs for information on cptfile format).

continentfill

False | fill continents.

continentfillcolor

200 | grayscale color or rgb tuple to fill continents.

continents

False | draw or fill continents and coastlines.

contourcolor

(0,0,0) | color for contours (default black).

contourfill

False | color-fill contours.

countries

False | draw country boundaries (including states in North America).

countrythick

1.0 | thickness to draw states.

cthick

0.5 | contour line thickness

drawclines

True | draw contour lines.

eaxis

True | draw east (right) axis.

elabels

False | draw labels on east (right) axis.

headerfontsize

18 | default fontsize for main, right and left titles. Set when class instance is created. Modifying later has no affect.

labelbar

True | draw a labelbar if contourfill or boxfill=True. the labelbar is horizontally oriented, and is located at the bottom of the plot by default. Numeric label size controlled by labelfontsize.

labelbararrows

True | if true, draw arrows at labelbar ends

labelbarheight

horizontal bar: yshift/6 OR vertical bar: xsize/25| height of labelbar (in xyunits) (in vertical case, height designate width...)

labelbarinc

2 | label lablelbar every labelbarinc levels.

labelbarlength

horizontal bar: 0.9*xsize OR vertical bar: 0.9*ysize | length of labelbar (in xyunits)

labelbarorient

'h' | set labelbar orientation. Can be set to 'h' (horizontal) or 'v' (vertical)

labelbartitle

None | title for labelbar - size given by axisfontsize.

labelbartitle_offset

0.1 | offset for labelbar title (in xyunits)

labelbarxpos

horizontal bar: 0.5*xsize OR vertical bar :xshift+1.05*xsize | x position of labelbar center (in xyunits)

labelbarypos

horizontal bar: -yshift/3 OR vertical bar:ysize*0.5 | y position of labelbar top (in xyunits)

labelfontsize

12 | fontsize for axis value labels. Set when class instance is created. Modifying later has no affect.

labinc

2 | label contours every labinc levels.

latframeinc

3 (if proj in ['loglinear','loglog']), otherwise latlabelinc if defined, latgrdinc if not | Increment for ticks on latitude axis. For log axes, default value of 3 means ticks will be drawn for 1,2,3,4...,9. Set when class instance is created. If modified, setmapparms method must be called again.

latgrdinc

getcint(latmin,latmax,6) | grid increment for latitude axis. Default is to choose approx. 6 "nice" levels. If < 0, no grid lines drawn for latitude axis. Set when class instance is created. If modified, setmapparms method must be called again.

latlabelinc

2 (if proj in ['loglinear','loglog']), otherwise latframeinc if defined, latgrdinc if not | Increment for latitude axis labels. For log axes, default value of 2 means labels will be drawn for 1,2,5. Set when class instance is created. If modified, setmapparms method must be called again.

latmax

90 | maximum latitude (or y axis value). Set when class instance is created. If modified, setmapparms method must be called again.

latmin

-90 | minimum latitude (or y axis value). Set when class instance is created. If modified, setmapparms method must be called again.

lefttitle

None | left title string.

lefttitlefont

0 | left title font (integer or string, run 'pstext -L' for options.

lefttitlefontsize

headerfontsize | left title font size.

lonframeinc

3 (if proj in ['loglinear','loglog']), otherwise lonlabelinc if defined, longrdinc if not | Increment for ticks on longitude axis. For log axes, default value of 3 means ticks will be drawn for 1,2,3,4...,9. Set when class instance is created. If modified, setmapparms method must be called again.

longrdinc

getcint(latmin,latmax,6) | grid increment for longitude axis. Default is to choose approx. 6 "nice" levels. If < 0, no grid lines drawn for longitude axis. Set when class instance is created. If modified, setmapparms method must be called again.

lonlabelinc

2 (if proj in ['loglinear','loglog']), otherwise lonframeinc if defined, longrdinc if not | Increment for longitude axis labels. For log axes, default value of 2 means labels will be drawn for 1,2,5. Set when class instance is created. If modified, setmapparms method must be called again.

lonmax

360 | maximum longitude (or x axis value). Hint - to plot longitudes between 60 degrees west and 60 degrees east, use lonmin=300 and lonmax=420. Set when class instance is created. If modified, setmapparms method must be called again.

lonmin

0 | miniumum longitude (or x axis value). Set when class instance is created. If modified, setmapparms method must be called again.

ltitleypos

chosen internally to be near upper left side of map | location of left title string.

ltitleyshift

ysize/15 | vertical displacement of left title above map.

maintitle

None | main title string.

maintitlefont

0 | main title font (integer or string, run 'pstext -L' for options.

maintitlefontsize

headerfontsize | main title font size.

mapscale

False | Draw a simple map scale. Scale is calculated at latitude latmin+latmax/2.

mapscalelatlon

False | specify position of map scale in lon/lat instead of x/y.

mapscalelength

approx 1/5 zonal scale of plot | length of map scale in km.

mapscalestyle

'p' | 'p' for plain style, 'f' for fancy.

mapscalexpos

xsize*4/5 | x-position of map scale.

mapscaleypos

ysize/10 | y-position of map scale.

maxlevel

default is min value of data | maximum contour level desired (if symmetriclevels=True, minlevel and maxlevel set to max(abs(minlevel),abs(maxlevel)).

minlevel

default is min value of data | minimum contour level desired.

missvalue

= 1.e20 ! data points greater than (less than if negative) this value are treating as missing and are set to NaN. These values are either not plotted, or are filled with color 'nancolor' (color-filled contour or boxfill plots).

mtitleypos

chosen internally to be near center of map, above right and left title | location of main title string

mtitleyshift

ysize/7 | vertical displacement of main title above map.

nancolor

(255,255,255) | color to fill NaN regions (default is white). Set when class instance is created. Modifying later has no affect.

naxis

True | draw north (top) axis.

negcontourcolor

contourcolor | optional separate color for negative contours.

negdashed

False | draw negative contours as dashed lines.

nlabels

False | draw labels on north (top) axis.

nozero

False | do not draw zero contour.

numlevs

15 | approx number of contour intervals desired (if cint not given, numlevs will be used to determine contour intervals).

oceanfill

False | fill oceans.

oceanfillcolor

200 | grayscale color or rgb tuple to fill oceans.

poscontourcolor

contourcolor | optional separate color for positive contours.

posdashed

False | draw positive contours as dashed lines.

proj

'cyl' | map projection (valid choices 'linear','loglinear','loglog', 'cyl' - cylindrical equidistant, 'npst' - North Polar Stereographic, 'spst' - South Polar Stereographic, 'lc' - Lambert Conformal Conic, 'la' - lambert azimuthal, 'merc'- mercator, 'ortho' - Orthographic), and 'gst' - general stereographic. Set when class instance is created. If modified, setmapparms method must be called again.

psview

"gs -q -dBATCH" | command for viewing postscript output (invoked when view=True in call to close method).

rectbounds

False | if true latmin,lonmin is interpreted as lower left corner of rectangular map, latmax,lonmax upper right. Set when class instance is created. If modified, setmapparms method must be called again.

reversecolormap

False | reverse the colors in the given colormap.

reverseyaxis

False | reverse direction of y-axis for non-geographic map projections so that values decrease upwards (useful when depth or pressure is y-axis). Set when class instance is created. If modified, setmapparms method must be called again.

righttitle

None | right title string.

righttitlefont

0 | right title font (integer or string, run 'pstext -L' for options.

righttitlefontsize

headerfontsize | right title font size.

rtitleypos

chosen internally to be near upper right side of map | location of right title string.

rtitleyshift

ysize/15 | vertical displacement of right title above map.

saxis

True | draw south (bottom) axis.

skipbarbx

1 | grid points to skip drawing wind barbs in longitudinal direction (1 means every wind barb is drawn).

skipbarby

1 | | grid points to skip drawing wind barbs in latitudinal direction (1 means every wind barb is drawn).

slabels

False | draw labels on south (bottom) axis.

stamp

None | Unix time stamp plotted with specified text.

stampxpos

0 | x position of Unix time stamp.

stampypos

-yshift/5 | y position of Unix time stamp.

standardpar1

lonmin + (1/6)*(lonmax-lonmin) | 1st standard parallel (only relevant if proj = 'lc'). Set when class instance is created. If modified, setmapparms method must be called again.

standardpar2

lonmin + (5/6)*(lonmax-lonmin) | 2nd standard parallel (only relevant if proj = 'lc'). Set when class instance is created. If modified, setmapparms method must be called again.

symmetriclevels

False | force contour levels to be symmetric about zero.

uscastatesonly

False | draw only us and canada state boundaries.

usstatesonly

False | draw only us state political boundaries.

verbose

False | if true, print all GMT commands. Set when class instance is created.

waxis

True | draw west (left) axis.

wlabels

False | draw labels on west (left) axis.

xaxislabel

"" | x-axis label (only used for proj='loglinear', 'linear', and 'loglog'.

xshift

0 | offset plot in horizontal (units given by xyunits). Set when class instance is created.

xsize

6.5 | width of plot (in units given by xyunits). Set when class instance is created.

xyunits

"i" | page measurement units (can be cm ('c'), inch ('i'), meter ('m'), or point ('p')). Set when class instance is created.

yaxislabel

"" | y-axis label (only used for proj='loglinear', 'linear', and 'loglog'.

yshift

xsize/4 | offset plot in vertical (units given by xyunits) Set when class instance is created.

ysize

6.5 | height of plot (in units given by xyunits). Set when class instance is created.

zerocontourcolor

contourcolor | optional separate color for zero contour.

zerothick

1.5 | thickness of zero contour.

Generated by Epydoc 2.1 on Sun Nov 14 07:18:16 2004 http://epydoc.sf.net