Skip to content

ylab/ expression/ superscript to a bracket

2 messages · S.McClatchie, Peter Dalgaard

#
Colleagues

  ----------------------------------
  System info:
  R version rw1022 on NT
  ESS v. 5.1.18 using emacs ver. 20.4

  ----------------------------------
  I have some rather unusual units for acoustic volume backscattering
  integrated over several metres depth and 10 transmits (which happens to
  = 160 m along transect). I need to express these units in a graph label.

  My problem comes in applying a superscripted number to a bracket (see
  the )^{-3} below:

  ylab=expression(paste('mean SV dB [', m^{2},' (160 m',)^{-3},']'))

  This gives an error (due to what is interpreted as an extra bracket).
  However, superscript requires a character to superscript to, so I can
  either use a dot (which is confusing in the label) 

   ylab=expression(paste('mean SV dB [', m^{2},' (160 m)',.^{-3},']'))

  or use another kind of bracket. Unfortunately the label needs two kinds
  of brackets. Also using a brace, }^{-3} doesn't help for obvious
  reasons.

  Any hints? Help will be appreciated.

  Thanks

  Sam

Sam McClatchie, Research scientist (fisheries acoustics))))))))))
NIWA (National Institute of Water & Atmospheric Research Ltd)
PO Box 14 901, Kilbirnie, Wellington, New Zealand
s.mcclatchie at niwa.cri.nz 

                    /\
...>><xX(?> // \\
                 /// \\\   
                //// \\\\
               ///  <?)Xx><<
              /////  \\\\\\
        ><(((?>   
  >><(((?>   ...>><xX(?>O<?)Xx><<

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
"S.McClatchie" <s.mcclatchie at niwa.cri.nz> writes:
?plotmath will tell you about phantom() and group()...

I'd go for 

plot(0, ylab=expression('mean SV dB  ' * 
	                group("[", m^{2} * ("160 m")^{-3}, "]")))