Hi,
Try this simple example, where the _expression_ is just a variable
evaluated at a location. It could be any _expression_ that evaluates
to a scalar.
yes? use etopo20
yes? shade/pal=land_sea/lev=c rose
yes? use ocean_atlas_subset
! some _expression_ that will go into the label.
yes? let temp_at_loc = temp[x=190,y=20,k=1,l=1]
yes? label/user 190,20,0,0,0.2,"`temp_at_loc,precision=3`"
The precision=3 is an example of using "grave-accent" embedded
expressions, to control the formatting of the number.
You can combine the number with text,
yes? label/user 190,20,0,0,0.2,"`temp_at_loc,precision=3` (Deg
C)"
-Ansley
On 1/7/2016 11:25 AM, Paulo B. Oliveira
wrote:
Hi Paul,
I think that you will find the solution using an embedded
_expression_, cf.
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/EMBEDDED-XPRESSIONS?searchterm=immedia
Regards,
Paulo
-------------
On Thu, 2016-01-07 at 11:41 -0700, Paul Goddard wrote:
Hello,
Is it possible to add a label/text to a
figure that is the value of a calculation made in the script
prior to plotting. For example, I would like to put the value of
heat content on my figure where heat content is calculated
previously in the same plotting script. I hope to eliminate the
need to change the label text in the plotting script each time I
tweak the calculation.
I know that one can define a symbol and
have the label place a string when called upon, ie
def sym val = 0
label "($val)"
and 0 will be placed on the figure
But this will not work if the defined
symbol is an equation and wanting to have the answer placed on
the figure.
... I hope this is clear.
Thanks in advance,
Paul
--
Paul Goddard
PhD Candidate
Department of Geosciences
University of Arizona
|