Skip to content

complex subscript/superscript on axis labels

3 messages · Eileen Meyer, David Winsemius

#
Hi All,

I am having trouble getting  a complex subscript to work.  I'm sure it's 
possible.  Here is what I have:


  ylab=expression(paste("log ",L[peak]," [erg ",s^{-1},"]")),

I would like to have the subscript read "peak,gamma" where the gamma 
would be the greek symbol.  I do want the comma to show as well.

Thanks,

EM
#
On Feb 9, 2012, at 12:53 PM, Eileen Meyer wrote:

            
(I do not see a gamma so using your verbal dsecription. The rest of  
your intent is muddied by the multiple subscripts. It's always  
difficult to know what people are thinking when they construct  
plotmath expressions and do not describe their full intent in English.  
Here's my guess:

ylab=expression(log~L[peak*","*gamma][~erg~s^-1])
  plot(1,1,ylab=ylab)

The paste function is rarely needed and generally confuses the intent  
of the author. Using "~" and "*" generally results in more  
comprehensible expressions.
#
On Feb 9, 2012, at 1:20 PM, David Winsemius wrote:

            
And it might look more "physics"-al if you had a "cdot" between the  
units:

[~erg %.% s^-1]
David Winsemius, MD
West Hartford, CT