Frequently asked questions

This is a list of NCAR Graphics frequently asked questions (FAQ) and their answers (or at least a pointer to where the answer can be found).
  1. Is there some kind of quick overview on what's available in NCAR Graphics Version 3.2.x?

    Yes, there's a man page. Type:

    	man ncargintro
  2. Is there a newsgroup or an e-mail group for NCAR Graphics users?

    There is no newsgroup, but there is an e-mail group for NCAR Graphics users to share ideas. To subscribe to this group, send the following in the body (not the subject line) of an e-mail message to Majordomo@UCAR.EDU:

    	subscribe ncarg-talk
    This will subscribe the account from which you send the message to the ncarg-talk list. If you want to subscribe another address instead (such as a local redistribution list), you can use a command of the form:
    	subscribe ncarg-talk other-address@your_site.your_net
    Once you are on the list, you can send e-mail to the entire group by sending e-mail to ncarg-talk@ncar.ucar.edu.

    The ncarg-talk forum gives NCAR Graphics users a chance to share information and ideas among themselves and to bring up NCAR Graphics issues that are of concern. NCAR personnel will not necessarily read or respond to this email group's correspondence on a regular basis. The intended use is solely for the NCAR Graphics user community.

    To unsubscribe from ncarg-talk, send the following in the body (not the subject line) of an email message to Majordomo@UCAR.EDU:

    	unsubscribe ncarg-talk
    This will unsubscribe the account from which you send the message. If you are subscribed with some other address, you'll have to send a command of the following form instead:
    	unsubscribe ncarg-talk other-address@your_site.your_net
    If you don't know what address you are subscribed with, you can send the following command to see who else is on the list (assuming that information isn't designated "private" by the owner of the list):
    	who ncarg-talk
    To find out more about the automated server and the commands it understands, send the following command to Majordomo@UCAR.EDU:
    	help
    If you feel you need to reach a human, send email to
    	ncarg-talk-approval@UCAR.EDU
  3. Is there an account available for users to contribute NCAR Graphics related software?

    Yes. The account is administered by a volunteer. Anyone who wants to contribute software to this library should contact the administrator at softadm@ncar.ucar.edu. To see what's available and for more information about this software library, see the README file in the anonymous FTP directory ncarg/softshare.

    Your anonymous FTP session should look like this:

    	ftp ftp.ucar.edu
    	Name(ftp.ucar.edu:login_name): anonymous
    	Password: your_email_address
    	ftp> cd ncarg/softshare
    	ftp> get README
    	ftp> quit
  4. I want to write an NCAR Graphics Fortran program, but would prefer not to start from scratch. Are there any examples available?

    Yes, you can use the application ncargex. See Appendix D of the NCAR Graphics Fundamentals manual for the type of graphic you want to generate, then note that example graphic's name to use with the ncargex application.

    Type:

    	man ncargex
    for more information. You can use ncargcex in a similar fashion for examples of NCAR Graphics C programs.
  5. Is NCAR Graphics available for PCs or VMS systems?

    No. NCAR Graphics was written to run on UNIX platforms only. If you have the NCAR Graphics source, then you are allowed to port to any kind of system you want. Notes from installers who have ported NCAR Graphics to various systems are available on our anonymous FTP account.

  6. How can I get help for porting NCAR Graphics to an unsupported system?

    There may be some port notes available on our anonymous FTP account. To find out which port notes are available, your FTP session should look like this:

    	ftp ftp.ucar.edu
    	Name(ftp.ucar.edu:login_name): anonymous
    	Password: your_email_address
    	ftp> cd ncarg/unix3.1
    	ftp> get README README.3.1
    	ftp> cd ../unix3.2.1
    	ftp> get README README.3.2.1
    	ftp> quit
    You can also try posting to the ncarg-talk e-mail group.
  7. I am calling the GKS routine GFA to fill an area, but it doesn't seem to be working. What's wrong?

    You probably need to call the GKS routine GSFAIS with a value of "1" to turn filling on. The default in GKS is not to fill, so you have to turn on fill before any calls to GFA will work.

  8. How can I count the number of frames in my metafile?

    Type the command:

    ncgmstat -c gmeta
    where gmeta is the name of your metafile.
  9. How can I change the default name of the metafile (gmeta) without modifying my code?

    There are two ways to do this. One is to use the ncargrun script:

    	ncargrun -o plot.ncgm program
    where plot.ncgm is the new name you want for the metafile, and program is the name of your executable.

    You can also use the NCARG_GKS_OUTPUT environment variable. For example, you would type the following before running your program:

    	setenv NCARG_GKS_OUTPUT plot.ncgm
    For more information, type:
    	man ncargrun
    	man ncarg_gks
    or see the section on environment variables in NCAR Graphics Fundamentals.
  10. How can I change the name of the default metafile from within my Fortran or C program?

    You can use the Fortran call GESC or the C call gescape. For an example of how GESC can be used, type:

    	ncargex pgkex21 -n
    and look at the Fortran file pgkex21.f.
  11. How do I send my graphics output directly to the translator (ctrans) instead of to a file?

    You can make use of the NCARG_GKS_OUTPUT environment variable (available starting with Version 3.1 of NCAR Graphics). For example, if you want to send your NCGM directly to the translator instead of creating an NCGM file, type:

    	setenv NCARG_GKS_OUTPUT "| ctrans"
    If you want to capture your NCGM to disk and translate it at the same time, the following script called foo may be used:
    	#!/bin/csh -f
    	tee gmeta | ctrans
    Now type:
    	setenv NCARG_GKS_OUTPUT " | foo"
    and run your program.
  12. I want to compile and link my NCAR Graphics program. What libraries do I need to load?

    Use the ncargf77 command just like the f77 command to compile and link your program. It will load in the necessary NCAR Graphics libraries.

    For example, if your program is called plot.f, you would type the following:

    	ncargf77 -o plot plot.f
    You can use ncargcc in a similar fashion to compile NCAR Graphics C programs.
  13. What is good software for editing CGMs on PCs or Macs?

    See the article "King of the Draw" in the 8/20/90 issue of Infoworld. (This compares four PC and four Macintosh packages).

  14. Whenever I try to run an NCAR Graphics application, I get the following message:
    	NCARG_ROOT environment variable not set.
    What should I do?

    If the directories containing the NCAR Graphics libraries and binaries reside under one root directory, then set the environment variable NCARG_ROOT to this directory. Otherwise, find out from your system administrator what you need to set the environment variable NCARG_ROOT to.

  15. How can I generate a quick-and-dirty black-and-white and/or color NCGM for test purposes?

    Type:

    	tgks0a
    for a b/w NCGM and:
    	ncargworld
    for a color NCGM. Both commands will create a metafile called gmeta.
  16. How can I find out what version of NCAR Graphics I am running?

    Type:

    	ncargversion
  17. Is there any documentation I can print?

    Yes. There are PostScript programmer documents in the directory $NCARG_ROOT/lib/ncarg/doc. Also, the NCAR Graphics Fundamentals document is available as a PostScript file. See your system administrator for its location.

  18. Whenever I bring up idt, I get the following message in the control panel:
    	Can't find any spooled devices for printing.
    and I can't seem to click on the "Print" button. What should I do?

    You need to set up an ncarv_spool file and put it in the directory $NCARG_ROOT/lib/ncarg. A sample ncarv_spool file might look like this:

    	pscolor : -d ps.color -simulatebg : | lpr -Pcolor
    	psmono : -d ps.mono  : | lpr -Pmono
    	xwd : -d xwd -resolution 600x600 : > ./gmeta.xwd
    where color is the name of your color PostScript printer and mono is the name of your monochrome PostScript printer. For more information on the ncarv_spool file, type:
    	man ncarv_spool
  19. How can I generate the graphic for the cover of the NCAR Graphics Fundamentals document?

    Type:

    	ncargex fcover
    This will create a metafile called fcover.ncgm.
  20. How can I determine what all the user entry points for a particular utility are?

    Type:

    	man utility_name
    where utility_name is the name of the utility in lowercase. For example,
    	man conpack
    Also, see "Appendix C: User entry points and functions" of the NCAR Graphics Fundamentals manual.
  21. How can I get a quick description of all the parameters of a particular utility?

    Type:

    	man utility_params
    where utility is the name of the utility in lowercase. For example,
    	man areas_params
    	man ezmap_params
    and so on. Some utilities do not use parameters, so they will not have parameter man pages.
  22. How can I generate all the example graphic files for a particular utility?

    Type:

    	ncargex -xxxx
    where xxxx is the name of a particular utility. For example:
    	ncargex -conpack
    Typing ncargex without any arguments will give you a list of all the available options.
  23. Where can I get quick access to the Ezmap area identifiers table?

    Type:

    	ncargfile ezmap_area_ids
    The identifiers are also printed at the end of the Ezmap chapter of the NCAR Graphics Contouring and Mapping Tutorial (page 153 of tutorial Version 2.0).
  24. How can I get direct X11 output instead of having my graphical output go to a metafile?

    You'll need to call NGPICT as well as changing your GOPWK call. For more information on these routines, type:

    	man gopwk
    	man ngpict
    or see the "User's Guide for NCAR GKS-0A Graphics" and the NCAR Graphics Fundamentals. To see example programs that produce direct X11 output, type:
    	ncargex fgke04
    	ncargcex c_xwndws
  25. How can I keep the current background color when converting from an NCGM to color PostScript?

    Use the -simulatebg option with ctrans:

    	ctrans -d ps.color -simulatebg gmeta > gmeta.ps
  26. How can I rotate my PostScript output by 90 degrees?

    Use the ps.land.mono or ps.land.color graphcap with ctrans.

  27. Does ctrans/ictrans support HP LaserJet printers?

    Yes. You can use the option -d hppcl. Type:

    	man ctrans
    for more information.
  28. How can I convert my NCGM to something that can be printed on an HP500c printer?

    You can first convert your NCGM to PostScript using one of the PostScript graphcaps with ctrans. Then you can use GhostScript to translate this PostScript to the HP500c printer. GhostScript is public domain software available on many anonymous FTP sites.

  29. How can I find out what devices are supported by ctrans/ictrans?

    Type:

    	gcaps
  30. Where can I get a description of these supported devices?

    Type:

    	man graphcap
  31. Where can I get a list of available NCAR Graphics fonts?

    Type:

    	fcaps
  32. Where can I get a description of these available fonts?

    Type:

    	man fontcap
  33. How do I concatenate a sequence of metafiles into a single file?

    First of all, you cannot use the UNIX command cat. You need to use the NCAR Graphics command med instead. For example, if your metafiles are called foo1.ncgm, foo2.ncgm, and foo3.ncgm, type:

    	med -e 'foo1.ncgm' -e 'r foo2.ncgm' -e 'r foo3.ncgm' \
    	-e 'w all.ncgm'
    to concatenate them into the file all.ncgm.
  34. What idt X resources can I add to my X resources file to control where the idt panels come up?

    Try the following and change the numeric values to suit your needs:

    	idt*geometry: 300x300+0+0
    	idt*TopLevelShell*geometry: +0+536
  35. How can I find out what version of a particular application I am running?

    Use the -Version option. For example:

    	idt -Version
    	rasview -Version
  36. How can I put an "end of picture" command at the end of a corrupted metafile?

    Use the following command:

    	med -e '1,$d' -e 'r corrupt.ncgm' -e 'w corrupt.ncgm' valid.ncgm
    where corrupt.ncgm is the metafile missing the `End of Metafile' element and valid.ncgm is any existing valid metafile (a metafile which contains an `End of Metafile' element).

    Be forewarned that the repaired metafile will inherit the global graphical attributes of the valid.ncgm metafile. Hence, the new file may differ greatly from the original. However, empirical evidence suggests that this trick works adequately in most instances.

  37. How can I use ictrans in batch mode to send certain frames of an NCGM to a color PostScript printer?

    First, modify the file $NCARG_ROOT/lib/ncarg/ncarv_spool and add the line:

    	pscolor : -d ps.color -d simulatebg : | lpr -Pxxxx
    where xxxx is the name of your PostScript printer. Then, if your metafile is called gmeta and you want to print frames 1, 2, 3, 4, and 8, you would type the following:
    	ictrans -e 'spooler pscolor' -e '1,4P' -e '8P' -e 'quit' gmeta
    For more information you can see the man pages for ictrans and/or ncarv_spool.
  38. Can I write NCAR Graphics programs in C?

    Yes, you can use the NCAR Graphics C-bindings. Type:

    	man ncarg_cbind
    	man ncarg_gks_cbind
    for more information, or see the section "Writing a C Program" in the NCAR Graphics Fundamentals manual. For an example of an NCAR Graphics C program that uses the C-bindings, type:
    	ncargcex c_colcon
    There are more examples available via ncargcex.
  39. How can I modify a graphcap so that the plot covers the entire page?

    First, you need to talk to your system administrator to find out where the source for NCAR Graphics is located. We will refer to the top level directory of the NCAR Graphics source as $NCARG. The ASCII version of the graphcaps are located in the directory $NCARG/common/src/graphcap. Make a copy of the graphcap you want to edit and call it something like
    name.fullpage.gc where name is the name of the original graphcap. You will need to modify name.fullpage.gc with an editor, but first read the following section.

    The GKS Standard requires that aspect ratio be preserved between window and viewport, hence by default if you are plotting on a non-square device, the largest viewport will be the largest square you can fit into the output rectangle. However, you can circumvent the standard if you are plotting to a graphcap- driven device. The graphcap keywords you will need to modify are:

    	DEVICE_COORD_LOWER_LEFT_X
    	DEVICE_COORD_LOWER_LEFT_Y
    	DEVICE_COORD_UPPER_RIGHT_X
    	DEVICE_COORD_UPPER_RIGHT_Y
    	DEVICE_COORD_XOFFSET
    	DEVICE_COORD_YOFFSET
    	DEVICE_COORD_XSCALE
    	DEVICE_COORD_YSCALE
    The essential ones are the last two. They will scale the plot by the specified amount in either the X direction or the Y direction. Of course when this is done, the X and Y offsets will probably need to be changed (these control how much is added to the base coordinates as specified by the first four keywords). Some adjustment may also be desired in the first four keywords. This is a trial- and-error process, but it goes pretty fast once you understand what the keywords do. Some simple experiments may help familiarize you with how they work.

    Once you have modified the ASCII graphcap to your satisfaction, you can create the binary graphcap by typing the following command:

    	graphc name.fullpage.gc name.fullpage
    Put the file name.fullpage in the directory $NCARG_ROOT/lib/ncarg/graphcaps and now you can use it just like you would use any of the other graphcaps with ctrans and ictrans.
  40. How can I include an NCGM graphic in a TeX or LaTeX document?

    First you need to convert the NCGM file to PostScript with the following type of command:

    	ctrans -d ps.color -simulatebg gmeta > gmeta.ps
    Convert this PostScript file to encapsulated PostScript using a filter of some kind:
    	ps2epsi gmeta.ps gmeta.epsi
    (ps2epsi is a utility based on GhostScript which takes an input PostScript file and generates a new output file which conforms to Adobe's "Encapsulated Postscript Interchange" format, called EPSI.)

    Then, in your TeX or LaTeX file, you need to have the following lines:

    	...
    	\input epsf
    	...
    	\epsfbox{gmeta.epsi}
    	...
    If you want to resize the figure, you can do so with one or both of the TeX commands:
    	\epsfxsize=dimen \epsfbox{gmeta.epsi}
    	\epsfysize=dimen \epsfbox{gmeta.epsi}
    This will cause the plot to have a width of dimen in the indicated direction, and the other direction will be scaled automatically to preserve aspect ratio.

    Important: The figure will not show up in the dvi file; it will only show up when you print or view the PostScript file.

  41. Is NCAR Graphics Version 3.2.x available for a DEC Alpha running OSF/1?

    Yes, it is. For more information, please contact your site representative, or call the NCAR Graphics consulting office at (303) 497-1201. You can also send e-mail to scdinfo@ncar.ucar.edu.

  42. Where can I obtain the latest PostScript version of this FAQ?

    The latest version of this FAQ is available in PostScript format via anonymous FTP. Your FTP session should look like this:

    	ftp ftp.ucar.edu
    	Name(ftp.ucar.edu:login_name): anonymous
    	Password: your_email_address
    	ftp> cd ncarg/unix3.2.1/doc
    	ftp> get FAQ.ps
    	ftp> quit

last updated September 20, 1994