[Thread Prev][Thread Next][Index]

Re: [ferret_users] degrees without "E", "W", ?



One more variation on what Ryo shows here.  Using system fonts, and I've also just tested this with a couple of them, the html-character specifiers seem to work well.  This gives a good result:

 set text arial
 use coads_climatology
 plot/set/y=0/L=1 sst
 ppl xfor(f5.1,''<&deg>'')
 ppl plot

(but only with an F5.1 numeric spec; other format specs show the problem with spacing that Ryo ran into.)

On 11/9/2023 10:46 PM, Ryo Furue wrote:
Dear Ansley and Billy,

Thank you for your help!  Here I summarize what I've found so far.

1.  "ppl xfor,(i5,''@im09'')" works with  "set text/font=HERSHEY", which is Ferret's native font.

2. With system fonts (but I have tried just one), the number and the text overlap!  So, something like

    ppl xfor,(i5,''___°'')

may kind of work if you replace the underscore "_" characters with non-visible white space characters from unicode (untested). I've just tested this idea with the underscores.

3.  "cancel mode long_label" does disable "E" and "W" but also disables degrees symbols:

yes? set data coads_climatology
yes? cancel mode long_tabel
yes? fill/L=1 SST


In this case, Ferret stops its special treatment of longitude axes.  So, you still need to add degrees symbols by yourself.

Cheers,

Ryo
-----------------
Out of curiosity, I checked what gfortran does with unicode characters. These days, unicode characters are nothing to worry about in modern languages.  So, this program

program try
  write(*,"(I5, '°')") 3
end program try


produced     3° on my screen.


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

Privacy Policy | Disclaimer | Accessibility Statement