[Thread Prev][Thread Next][Index]
Re: [ferret_users] ppl yfor
Hello again,
I think we're best off just using the F8.0 format. As all values within
Ferret are real numbers, and trying to write them with an integer format
for output is the trouble. There is some logic that can recognize an I
format code at the start of the format statement and convert the value
being written to the label to an integer, but in general the Fortran
format is applied as is to the real number.
For this statement,
ppl yfor,("\", i8) (DOES NOT WORK, WHY? )
We are attempting to write a real number with this I format. It fails
because it translates internally to writing the real number, say 2.0 to
a string using the Fortran format ("\", i8) and the result is ********.
I would suggest instead,
ppl yfor,("\", f9.0)
Where 9 rather than 8 is used to allow for the decimal point. I will
see that this is documented in the Users Guide.
Ansley
Ansley Manke wrote:
Hi -
It looks like the machinery that generates strings for labels from a
user-supplied format has trouble with a format statement with a string
and then an I format. (The command ppl yfor ("B", i4) also fails,
giving B****). I'll look into this, but in the meantime note that a
format of
ppl yfor ("\", f8.0)
works. The addition of a dot a the end of your numbers may not quite
be what you want but it's closer to the desired result. Note that
Prasad is using "\" for a blank; if we just use " ", then subsequent
processing removes the blanks preceeding the numbers.
Ansley
Prasad Thoppil (Forn-Natl) wrote:
I am trying to control the y-axis label format on the right side. See my
example below
use coads_climatology
plot/set/x=65/y=10 uwnd
ppl axlabp 1 1
ppl yfor,(f8.2) (WORKS FINE)
ppl yfor,("\", f8.2) (WORKS FINE, I NEED THIS)
ppl yfor,(i8) (WORKS FINE)
ppl yfor,("\", i8) (DOES NOT WORK, WHY? )
ppl plot
Thanks
Prasad
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement