Re: Minor details on plots

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 4 Nov 2004 08:53:25 -0700 (MST)

> 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:

Click on any one of the fonts to see a full table of that particular
> 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_at_tmXBMajorOutwardLengthF = 0.
  res_at_tmXBMinorOutwardLengthF = 0.
  res_at_tmYLMajorOutwardLengthF = 0.
  res_at_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_at_mpLimitMode = "LatLon"
   res_at_mpMinLatF = -35
   res_at_mpMaxLatF = 35
   res_at_mpMinLonF = -80
   res_at_mpMaxLonF = 20

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

for a full description of the various options.

> Thanks much!

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


> Derrick Snowden
> 4301 Rickenbacker Causeway
> Miami, FL 33149
> Office: 305.361.4322 Fax: 305.361.4392
pyngl-talk mailing list
Received on Thu Nov 04 2004 - 08:53:50 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 19 2006 - 21:30:17 MST