Displaying Data in GrADS

Drawing Data Plots
Clearing the Display
Graphics Output Types
Advanced Display Options

## Drawing Data Plots

The `display` command is how you actually display data (output expressions) plots via the graphics output window. The command is:

  `display expression`

  or

  `d expression`

  The simplest `expression` is a variable abbreviation.

  If you display when all dimensions are fixed, you get a single value which is typed out.

  If you display when one dimension varies, you get a 1-D line graph by default.

  If you display when two dimensions are varying, you get a 2-D contour plot by default.

  A variety of plot types are available in addition to the above defaults.

  ## Clearing the Display

  GrADS will overlay the output from each display command. To clear the display, enter:

  `clear` (or just `c`)

  Issued without parameters, the `clear` command does pretty heavy duty clearing of many of the GrADS internal settings. Parameters can be added to limit what is cleared when using more advanced features, for example:

  `c events` flushes the events buffer (e.g., mouse clicks)
  `c graphics` clears the graphics, but not the widgets
  `c hbuff` clears the display buffer when in double buffer mode

  WARNING: If you make any error in the syntax of clear then GrADS does the full clear...

  ## Graphics Output Types

  Before you can display a graph of your data, you will need to set the type of plot you want and, probably, some other graphics parameters as well.

  By default, when one dimension varies, you get a line graph, and when two dimensions vary, you get a contour plot. These defaults can be changed by the command:

  `set gxout graphics_type`

  Some examples of `graphics_type` are `contour, shaded, grid, bar, vector,` or `streamline`. For a complete list, see the reference page.

  There are many options that can be set to control how the data will be displayed for each `graphics_type`.

  For the graphics output types `vector, stream,` and `barb`, the plotting routines need two result grids, where the first result grid is treated as the U component, and the second result grid is treated as the V component. These two result grids are provided to the display command by entering two expressions separated by a semicolon:

  `display u ; v
  display ave(u,t=1,t=10) ; ave(v,t=1,t=10)
  `

  For the graphics output types `vector` and `stream`, you can specify a third result grid that will be used to colorize the vectors or streamlines:

  `display u ; v ; mag(u,v)
  display u ; v ; hcurl(u,v)
  `

  For a graphics output type `wxsym`, each value at a station location is assumed to be a wx symbol code number. To see a chart of all available wx symbols and their corresponding code numbers, run the sample script `wxsym.gs`.