Skip to content

Add interpunct (dot) symbol to axis label?

7 messages · Hillary Ward, Duncan Murdoch, Uwe Ligges +1 more

#
On 12-08-08 9:21 PM, Hillary Ward wrote:
The interpunct symbol is \u00b7 in Unicode.  You could try that, i.e.

y_label = expression(paste(plain('CPUE
'),plain('(fish'),plain('\u00b7'),plain('h'^{-1}),plain(')')))

It might not work if your graphics device doesn't support Unicode.

Duncan Murdoch
#
On 09.08.2012 13:56, Duncan Murdoch wrote:
As I explained yesterday in another mail with that question (so 
apparently it is a homework problem we should not answer at all), one 
could use the UTF-8 encoded version by

  options("OutDec"="\xB7")

and just start the plotting ...

Uwe Ligges
#
On 09/08/2012 11:52 AM, Uwe Ligges wrote:
Yes, I saw your message, which is how I knew the symbol exists.  But I 
think the question is different:  this one isn't being used as a decimal 
point, just a dot in a formula.

Duncan Murdoch
#
On 09.08.2012 18:05, Duncan Murdoch wrote:
Oh, sorry, should read more carefully:

Several years ago I added %.% to the plotmath syntax symbols for that 
reason, see ?plotmath, hence:

plot(1, main = expression(CPUE(fish %.% h^{-1})))

seems to do the right thing.

Best,
Uwe
#
On Aug 8, 2012, at 6:21 PM, Hillary Ward wrote:

            
I see you have seen other efforts in this direction, but thought I  
would throw in something different. I think the 'interpunct' symbol is  
already include in plotmath as '%.%'

.... and I cannot resist attempting to greatly simplify that complex  
expression. Most uses of the plotmath 'paste' function I see in other  
postings are both redundant and obfuscatory (at least I think that  
should be a word). And parentheses behave as expected .... And you do  
not need to use quotes around anything that is not a plotmath  
function.  I think this does the same construction and is MUCH easier  
to read:

   ylab = expression( CPUE(fish %.% h^{-1}) )