Hi,
Apologies. My example has a mistake. I showed this:
label 180,0,0,0,0.2,@IM22@MA26@AS Text @MA27
where I used the @AS font, which is one of the ones that ignores the use of @ to change fonts. So it changes back to a text font and writes the word Text, but then doesn't change back to a math font but instead puts @MA27 in the label. Instead, try this
label 180,0,0,0,0.2,@IM22@MA26@SR Text @MA27
-------- Forwarded Message --------
Subject: Re: [EXTERNAL] Re: [ferret_users] how to show angle brackets in labels/titles Date: Mon, 31 Jan 2022 14:47:58 -0800 From: Ansley Manke <a.c.manke@xxxxxxxxx> CC: ferret <ferret_users@xxxxxxxx>
Hi,
When using the Hershey font, I think that you need to change back to a character font, something like this,
label 180,0,0,0,0.2,@IM22@MA26@AS Text @MA27
There are some details about the different character fonts, with some characters having special meanings, forexample, that ^ indicates superscripting, and a few other . That's discussed here: https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/customizing-plots/FONTS#_VPINDEXENTRY_831
Ansley
On 1/31/2022 1:29 PM, Xiaoyu Bai wrote:
Dear Ryo and Ansley,
emdash works for some fonts like Times. For fonts like Helvatica, the symbol became a mirror symmetric "C" for emdash. 😸 So the emdash trick works for some fonts.
The Math font methods have some problems. If I do
label 180,0,0,0,0.2,@IM22@MA26 Text @MA27
Pyferret doesn't recognize Text is not a math symbol so the label came out as —<....>. Is there a command like @Text, so Ferret can recognize the text?
Thank you very much and stay healthy,
Xiaoyu
On Fri, Jan 28, 2022 at 1:50 AM Ryo Furue <furue@xxxxxxxxxx> wrote:
Dear Xiaoyu,
By the way, are there some tricks to "draw" a longer line in a label but without really plotting the line?
Say I use
label 0 -12 0 0 .2 - -<OLR>
to label a line (-) using a negative OLR -<OLR>. They both come out as the same length. I am currently using
label 0 -12 0 0 .2 _ -<OLR> to distinguish these two lines.
Let me know if there are better tricks.
Actually, you can use any unicode characters with system fonts. I'm attaching a ferret script to demonstrate how you use them.
You probably want to use some of these:
endash: –emdash: —minus: −hyphen: -
For a longer dash, you can repeat endash or emdash:
2 endashes: ––2 emdashes: ——2 minuses: −−2 hyphens: --
Unfortunately, how these characters look on your plot depends on the font you use. In particular, some of the repeated dashes may or may not be connected. You may need to test various fonts.
In unicode, there are other dashes that are guaranteed to be connected:
Regards,
Ryo
!--- "dashes" demonstration ----set data coads_climatology
set text/font=Helvetica
fill/L=1 SST
label 180,0,0,0,0.2,"endash–; emdash—; minus−; hyphen-"label 180,-30,0,0,0.2,"endash––; emdash——; minus−−; hyphen--"
set text/font=Times
fill/L=1 SST
label 180,0,0,0,0.2,"endash–; emdash—; minus−; hyphen-"
label 180,-30,0,0,0.2,"endash––; emdash——; minus−−; hyphen--"
--
Xiaoyu (she/her)