Wrong text() adjustment with (math)expression and "\n" (PR#299)

About this list Date view Thread view Subject view Author view Other groups

Subject: Wrong text() adjustment with (math)expression and "\n" (PR#299)
maechler@stat.math.ethz.ch
Date: Wed 27 Oct 1999 - 03:57:17 EST


Message-Id: <199910261757.TAA12834@pubhealth.ku.dk>

This is adapted from partha_bagchi@hgsi.com 's report on R-help:

     plot(0); title(expression("Bad\n with much much more text")))

gives something like

      Bad
          with much much more text

(``newline w/o carriage return'') instead of centering both lines such as

               Bad
     with much much more text

which is produced by (just dropping `expression' from the above)

      plot(0); title(("Bad\n with much much more text"))

By the way, the following would need even more attention if one insists on
correct behavior:

plot(0)
title(expression(paste("Still works with math\n", "with",
                       frac(1,sum(x[i], i==1,n)), " and more text")))

Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:09 EST