Re: Minor details on plots

From: Mary Haley (haley AT ucar.edu)
Date: Thu Nov 04 2004 - 08:53:25 MST

  • Next message: Julie Arblaster: "Re: ctrans"

    >
    > Hi all,
    >
    > I'm sending this message to both the ncl an dpyngl lists in case you receive
    > this twice. I have a few minor detail oriented questions on plot resources
    > which I assume exist in both ncl and pyngl. So an answer from either group
    > will do.
    >
    > It never ceases to amaze me that you can summarize a fifty year data set and
    > generate 20 plots in a half hour but it's all too easy to waste 4 hours
    > trying to figure out how to change a font size or some other such preference.
    > Anyway, here goes...

    Hi Derrick,

    Thanks for your comments. I will try to respond to each one below. I
    agree, the dizzying list of resources can be a bit tiresome trying to
    find how to do a simple thing. It's the old trade-off between having
    the simplicity versus being able to tweak every aspect of a plot.

    > 1. Is there a way to use italics or oblique fonts? I use Helvetica for almost
    > everything but I don't see any way to emphasize text by italicizing it.

    Another NCL developer gave me the answer to this one:

        There are no italic fonts for the filled fonts, but there are the
        stroked fonts complex_italic and triplex_italic - these font
        styles are not consistent with Helvetica, but are somewhat
        consistent with Times-Roman. You could consider using using bold.

    You can see the full font table at:

       http://ngwww.ucar.edu/ngdoc/ng/ref/FontTable.html

    Click on any one of the fonts to see a full table of that particular
    font.
     
    > 2. With the gsn_csm_* templates, can I easily turn the tick marks inward?

    The gsn_csm templates were specifically tweaked to turn the tickmarks
    outwards (because NCL's default is to turn them in), so it's not as
    easy as it should be. The tickmark lengths are set by indicating the
    full length of the tick mark, and then using the
    "tmXXYYYYOutwardLengthf" resource to indicate which part of that full
    length should point outward.

    So, by setting the Outward resources to 0, you can force the tick
    marks to point inward. Try this:

      res@tmXBMajorOutwardLengthF = 0.
      res@tmXBMinorOutwardLengthF = 0.
      res@tmYLMajorOutwardLengthF = 0.
      res@tmYLMinorOutwardLengthF = 0.

    > 3. If I can do number 2 above, is there a way to introduce a small amount of
    > space between the axis box and the data that is contoured or plotted? There
    > is an example of what I'm talking about attached.
    >

    If you are overlaying contours on a map, the way to do this is via
    the map limit resources. For example, if your data is on a grid
    that goes from 32S to 32N, and from 78W to 17E, but you want the
    actual map area to go from 35S to 35N and 80W to 20E, then
    you can set the following map resources:

       res@mpLimitMode = "LatLon"
       res@mpMinLatF = -35
       res@mpMaxLatF = 35
       res@mpMinLonF = -80
       res@mpMaxLonF = 20

    Note that depending on your map projection, you might want to set your
    map limits differently. Please see:

    http://ngwww.ucar.edu/ngdoc/ng/ref/hlu/obj/MapTransformation.res.html#mpLimitMode

    for a full description of the various options.

    > Thanks much!

    You're welcome! Let me know if this didn't answer all your questions.

    --Mary

    > Derrick Snowden
    > PhOD/AOML/NOAA
    > 4301 Rickenbacker Causeway
    > Miami, FL 33149
    > Office: 305.361.4322 Fax: 305.361.4392
    >
    _______________________________________________
    pyngl-talk mailing list
    pyngl-talk AT ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/pyngl-talk



    This archive was generated by hypermail 2b29 : Thu Nov 04 2004 - 08:55:53 MST