Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Left/right justifying rotated text

  • To: mathgroup at smc.vnet.net
  • Subject: [mg46943] Left/right justifying rotated text
  • From: kj <socyl at 987jk.com>
  • Date: Tue, 16 Mar 2004 19:55:08 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I want to place rotated text in a graphic in such a way that the
left (or right) edge of the text lands on the specified location
{x, y}.  When I say "left" (or "right") edge of the text, I mean
the edge corresponding to the left (or right) edge of the *unrotated*
text, not the left (or right) edge of a bounding box around the
text having its sides parellel to the coordinate axes.  The text
in question is to be rotated by an angle other than an integral
multiple of Pi/2.  For example, if the string in question is
"rotated", the location is {0, 0}, and the rotation angle is Pi/4,
I want the midpoint of the left edge of the initial "r" to be in
the upper right quadrant, more or less at Scaled[{0.03, 0.03}].

When I try

  Show[
    Graphics[
      Text["rotated", {0, 0}, {-1, 0}, {Cos[Pi/4], Sin[Pi/4]}]],
    Axes->True];

the text is rotated correctly , but placed such that the "r" is in
the lower left quadrant, and {0, 0} appears right above the "t"
(or the "o", depending on how one interprets the word "above").
This doesn't agree with the documentation for Text, no matter how
I interpret it.

How can I do what I want to do?

Thanks!

kj

P.S. Note my sig before emailing me.
-- 
NOTE: In my address everything before the period is backwards.


  • Prev by Date: How to get non-printing heads?
  • Next by Date: Re: How to read a string from a file?
  • Previous by thread: Re: How to get non-printing heads?
  • Next by thread: Exporting data and comments