[Thread Prev][Thread Next][Index]

Re: [ferret_users] Can we add legend to the plots?



Hi Hui,
We do need more documentation on this point. I'll work on that. There are a few index entries under "key" which point to some related topics, but not to this in particular.

There are several ways to get legends. Ferret automatically creates a legend below the plot when you plot several lines in one PLOT command. Try this;

yes? PLOT/i=1:10 i/2, i/4, 1./i

If you add lines to an existing plot with PLOT/OVERLAY, then the legend is placed at the lower left. The first plot doesn't have a line in the legend, as it is not known when the first PLOT command is issued whether it will be part of a multi-line plot

yes? plot/i=1:10 i
yes? plot/over/i=1:10 1 + i/4
yes? plot/over/i=1:10 1 + 1./i

In addition, several users have contributed scripts to give you more control over the legends. You make your plot with PLOT/NOKEY to remove the automatic legend, and then call legend.jnl or legline.jnl. The go/help command prints out the start of a script so you can see what it does.

yes? go/help legend
yes? go/help legline
yes? go/help legline_nu

For the legend.jnl script, there is a demonstration script that makes some simple plots and shows how to call it;

yes? go test_legend.jnl

By the way, one way to search for scripts that might be included with Ferret is the Unix command Fgo. Give the command some text to search for in the names of scripts. The command returns names of scripts that match the text.

> Fgo legend
legend.jnl
test_legend.jnl

> Fgo leg
legend.jnl
legline.jnl
legline_nu.jnl
test_legend.jnl

Ansley

Hui Du wrote:

Dear ferret users:
I wonder whether we can add legend to my plots, for instance I want others to know what different colors and shapes mean.
Can we do that? I have not found the information about this from the documents.
Thanks a lot
Hui

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to get there! http://lifeevents.msn.com/category.aspx?cid=Retirement







[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement