[Thread Prev][Thread Next][Index]
Re: creating animated GIFs with consistent colour scales (oops!)
Oops! I typed the wrong back-quotes in my previous message!
(The result of getting up in the morning, stumbling over to
the computer, and starting to type away).
Please delete the previous message and read this one instead:
-------------------------------------------------------------------
Hi Jon -
You can do this by putting the variables minval and maxval
within backward quotes:
shade/levels=(`minval`, `maxval`, 10) isotherm
Those quotes indicate "immediate evaluation" mode,
that will turn them into plain constants that can be
used as you propose.
If you are also contouring over your shade or fill plot,
then it would probably improve their appearance and readability
to specify no decimal point or places in your contour levels:
shade/levels=(`minval`, `maxval`, 10, -1) isotherm; ppl contour/over
(The final argument to the /LEV qualifier gives the number
of decimal places in the contour labels).
Note that the STAT command will tell also you the global
min and max of a variable:
STAT isotherm
Regards .... Billy K
> From: Jon Blower <jdb@mail.nerc-essc.ac.uk>
> Date: Thu, 28 Aug 2003 15:06:18 +0100 (BST)
> Subject: creating animated GIFs with consistent colour scales
>
> Dear Ferret users,
>
> I'm trying to create an animated GIF representing the timeseries evolution
> of (for example) the depth of a certain isotherm in a dataset. I am doing
> this by creating a load of GIFs using commands like:
>
> # get a variable containing the depth of the 283K isotherm
> let isotherm = temperature[z=@loc:283];
>
> # now create a series of GIF files, one for each timestep
> repeat/l=1:10 (shade/levels=100 isotherm; frame/file="isotherm.gif");
>
> I then use whirlgif to assemble these frames into an animated GIF.
>
> The problem is that each frame comes out with a different range of depths
> for the isotherm, so the colour scales in each frame are different. I'd
> like to be able to work out the minimum and maximum depths of the isotherm
> in the entire dataset, then use this range for every frame. This way the
> colour scales would be consistent and there would be no frames containing
> data out of this range.
>
> I can find the minimum and maximum values easily:
> let minval = isotherm[i=@min,j=@min,l=@min];
> let maxval = isotherm[i=@max,j=@max,l=@max];
>
> I thought I might be able to create the pictures using a command like:
> shade/levels=(minval, maxval, 10) isotherm;
> but I get a syntax error. It seems that using variables instead of
> explicit numbers in shade/levels is not allowed.
>
> How can I get the values of minval and maxval into the shade/levels
> command? Or is there another way to do the same thing?
>
> Any help would be very much appreciated.
>
> Jon
>
> --
> --------------------------------------------------------------
> Dr Jon Blower Tel: +44 118 378 5213 (direct line)
> Research Fellow Tel: +44 118 378 8741 (ESSC)
> ESSC Fax: +44 118 378 6413
> University of Reading Email: jdb@mail.nerc-essc.ac.uk
> 3 Earley Gate
> Reading RG6 6AL, UK
> --------------------------------------------------------------
>
>
>
>
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement