MathGroup Archive 1999

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

Search the Archive

Re: Rotated Text within a Table

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17624] Re: Rotated Text within a Table
  • From: Paul Abbott <paul at physics.uwa.edu.au>
  • Date: Fri, 21 May 1999 03:37:25 -0400
  • Organization: University of Western Australia
  • References: <7hgb1t$3uv@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Jeff Allen wrote:
 
> I have a quick question I'm sure someone will be able to solve.  I have
> generated a text table using the TableForm command and I would like to
> label the left hand side of it using text rotated vertically.  I can
> rotate text within a graphic object but not within this table.  I have
> been assuming the correct approach would be to convert the table to a
> graphic object but I have been unsuccessful at accomplishing this.

Instead of using a Table, I would use a GridBox.  E.g.,

[1] Some code for rotating a text string:

 label[s_String] := GridBox[Transpose[{
	FromCharacterCode /@ ToCharacterCode[s]}]]

[2] Some dummy data,

 data = Table[{n, n^2 + n}, {n, 7}]; 

with a header row,

 PrependTo[data, {"n", "f(n)"}]; 

[3] Display the (nested) GridBox:

 DisplayForm[GridBox[{{label["data"], GridBox[data, 
      RowLines -> {1, 0}]}}, GridFrame -> 2, 
   ColumnLines -> 1]]//TraditionalForm

Cheers,
	Paul

____________________________________________________________________ 
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia           
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au 
AUSTRALIA                        http://www.physics.uwa.edu.au/~paul

            God IS a weakly left-handed dice player
____________________________________________________________________


  • Prev by Date: Re: looking for implementation of hash function
  • Next by Date: Re: fourier transform and bug reporting
  • Previous by thread: Rotated Text within a Table
  • Next by thread: Directed, Labeled Graphs