[Thread Prev][Thread Next][Index]

Re: [ferret_users] Putting text on a figure that a value from a calculation in the script



Hi there Paul,

You can do that without even using the def sym. You just need to define a variable with the value you want like and them use the label command:

let label = (any equation you want)
label 1 1 -1 0 0.2 "`label`"

It is importante to use `` to let ferret know that you want the value of your _expression_ and them ""... I don't know exactly why but I think it's just so ferret know that want to plot what is in between them. 

Let me know if that doesn't solve your problem. 

Best regards,
Andre Rodrigues



On 7 January 2016 at 13:41, Paul Goddard <goddarpb@xxxxxxxxx> 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


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement