[Thread Prev][Thread Next][Index]

Re: [EXTERNAL] Re: [ferret_users] how to show angle brackets in labels/titles



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:

https://en.wikipedia.org/wiki/Box-drawing_character#Box_Drawing

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--"
 

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

Privacy Policy | Disclaimer | Accessibility Statement