DSWP (Swap the contents of two buffers)

The DSWP command swaps the contents of two X, Y or Z data buffers.

Command Syntax:

DSWP xyz,xyz

Command Parameters:

xyz,xyz

The data buffers to be swapped, specified as single letters 'x', 'y', or 'z'.

 

If only one buffer is specified, then whichever of the X or Y buffers spanning the greatest range is placed in the specified buffer. This allows you to simply specify DSWP X in order to place the ordinate with the greatest range in the X buffer.

Example:
PAGE 1,1,25,26 /define a plotting page

WIND 1,2,15,22,23 /define a data window

WDEF 0,48000,1500,50000 /define window coordinates

DOPN mag,2 /open MAG.XYZ to read second Z

DXYZ L100 /read Line 100 into buffers

DSWP Z,Y /swap Z and Y buffer

LINA 0 /plot buffer as world coordinates

This control file will draw a scaled profile of the data in the second column of Line 100 in data file MAG.XYZ.

  • This command is part of the MAPPLOT GX.