Re: adding symbols

From: Mary Haley (haley AT XXXXXX)
Date: Tue Jun 24 2003 - 10:54:08 MDT

  • Next message: Louis J. Wicker: "Problem running defined fortran libs"

    > dear ncl users:
    > just wondering how to add a symbol as text to a plot.
    > i would like to add the symbol for potential temperature
    > (theta). could i do this using function codes somehow?
    > thank you,
    > matt

    Hi Matt,

    Yes, any time you want to add a special symbol to a plot, you
    can usually do this via a text function code. First, visit the
    NCL font tables at:

    You can click on any one of the font names or numbers to see all the
    characters for that font. If you see one you like, keep track of which
    character it is associated with. I'm going to use the infinity symbol
    as an example (font table 34, character "%"):

    load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"

       wks = gsn_open_wks("x11","example")

       inf_sym = ":F34:%"


    Note that the colon (:) in the string ":F34:%" tells NCL that you are
    about to enter a function code, which is "F34" in this case. This
    tells NCL to start using font table 34. The second colon takes you out
    of function code mode, and back into regular mode. Then, when the "%"
    is encountered, you will get whatever character this represents in
    font table 34 (an infinity symbol).

    Some people may have redefined the function code to be another
    character (like a tilde (~)), in which case you will need to use this
    character in place of the colons.

    You can see some examples at:


    Mary Haley haley AT
    NCAR/SCD/VETS 303-497-1254 (voice)
    1850 Table Mesa Dr 303-497-1804 (fax)
    Boulder, CO 80305
    ncl-talk mailing list
    ncl-talk AT

    This archive was generated by hypermail 2b29 : Tue Jun 24 2003 - 13:16:59 MDT