N.B.: This command was deprecated long ago and is not included in grads version 1.9 or later.
wi (write image) command dumps an exact copy of the
contents of the grads graphics screen directly to an image file. This
feature is implemented by means of an interface to the ImageMagick library. The syntax is:
filename can be any meaningful file name,
fmt is one of the ImageMagick supported
formats: gif, bmp, cgm, eps, fax, ico, jpeg, pcx, hdf, and
Because it requires a connection to an X-server,
widoes not work when running grads in batch mode (-b option). A similar command that does work in batch mode is
- Some ImageMagick formats (tiff, png, mpeg, et al.) are not yet supported by grads. If a specified format is not recognized or supported, the image will be saved in MIFF, ImageMagick's native format. If a file name extension is not specified, GIF is the default.
Make sure no other window is on top of your grads graphics windows
when issuing a
witakes a snapshot of the current state of this window. If another window is partially covering your graphics window, your image file will contain the combination of these 2 windows.
To try out
wi, display something on the graphics screen,
and then at the ga-> prompt enter:
wi test.giffor writing a GIF file
wi test.jpegfor writing a JPEG file
wi test.bmpfor writing a Windows BMP file
Bugs for Win32 GrADS Users
On Windows 95 systems, GradsHDF, the version built with the NCSA
MFHDF library, has a subtle bug when reading certain 16-bit (short)
packed NetCDF files (e.g. NCEP re-analysis files converted to
NetCDF at CIRES/CDC). Although GrADS is able to produce a plot, it
mistankenly produces very large values for a few grid
points. Work around: use GradsNC in such cases. This problem has not
been reported on Windows NT systems.
X Windows widgets built with gs scripts may miss/delay some X
events (keyboard/mouse clicks). This problem appears to occur only on
Windows 95; it has not been reported on Windows NT.
Athena widgets built with gui scripts: menu items become invisible
when selected (MI/X Server only); some mouse delays on Windows 95.
wihas been reported to produce black and white GIF output on VGA systems with more than 256 colors. The workaround is to write a JPEG image, or to change your Windows display to 256 colors.