[Thread Prev][Thread Next][Index]

Re: [ferret_users] Where are the contour labels in my postscript file?

Ryo's suggestions are correct.

A bit of thought shows that choosing the location of contour labels is a non-trivial problem, one of those things that is easy for a human to visualize when looking at a plot as a whole, but much harder to code when drawing an individual contour line without necessarily knowing where the other lines will go. It requires balancing two concerns: to avoid overwriting labels on neighboring contours, and to choose an appropriate label spacing along an individual contour line.

The problem is exacerbated in Ferret because the underlying contour routine dates from the 1960s, and and was written to break a large grid into smaller sections because of lack of memory (you can see this in action if you watch a plot being made over a slow connection). The algorithm tries to put a contour every 5 inches (12.7cm) by default, which would mean 1-2 labels on each line across a default-size 8-inch plot box. But when the grid is dense and the plot is broken into many small sections, there may be no 5-inch intervals to be found.

You can adjust this with the DSLAB argument to the PPL CONSET command (http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/ appendix-b-pplus-guide/COMMAND-DESCRIPTION#_VPID_675):

contour/set/.... variable
ppl conset,hgt,nsig,narc,dashln,spacln,cay,nrng,dslab ! change DSLAB to a value smaller than 5
ppl contour

As usual for PPL commands, use empty commas to leave the defaults, for example:

contour/set/... variable
ppl conset,,,,,,,,2.5
ppl contour

Some experimentation is required!

But this may not always work, and Ryo's first suggestion is a good one: project the field onto a less-dense grid. In fact the problem usually appears only when the grid is far denser than can be seen in an actual plot, so the plot appearance may be unchanged on a less- dense grid, and the labels will usually be improved.

Billy K

(a non-trivial problem
On 28 Nov 09, at 2:56 AM, Ryo Furue wrote:

Hi Paulo,

| I'm producing some postscript contour plots and I realized that the
| labels are not appearing.
| What can I do to get back the labels of my contour plot?

There are Ferret users who know the issue much better
than I, but since it's a holiday week (at least here
in the US), they may not be responding quickly.

So, if you are in a hurry, you might want to search
the archive of past email messages.  (Go to the homepage
of Ferret and then to "email users group".)  I've seen
a few threads dealing exactly your problem.

Having said that, I can think of three potential solutions.

1) Project your field onto a coarser grid.  When there are
  too many datapoints, you tend to lose contour labels.

2) Reduce the size of contour labels.

3) Adjust the "density" of contour labels.

Please refer to the user's manual on how to do these.


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement